Module
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Module::SoundClip Class Reference

#include <SoundClip.hpp>

Public Member Functions

const std::string & getName () const
 
unsigned int getFrequency () const
 
uint16_t getNextUID ()
 
void setFrequency (const unsigned int f)
 

Protected Member Functions

 SoundClip (std::string n, AudioInterface *aI)
 
 SoundClip ()
 

Protected Attributes

std::string name
 
uint16_t numInstances
 
AudioInterfaceaudio
 
unsigned int frequency
 

Friends

class AudioInterface
 
class Book< SoundClip >
 

Detailed Description

The SoundClip represents a single sound's data, which is stored in the AudioInterface, and which is read from by SoundInstances, which represent the actual playing of sounds.

Constructor & Destructor Documentation

Module::SoundClip::SoundClip ( std::string  n,
AudioInterface aI 
)
inlineprotected
Module::SoundClip::SoundClip ( )
inlineprotected

Member Function Documentation

unsigned int SoundClip::getFrequency ( ) const

Gets the frequecy of this SoundClip, in Hertz.

const std::string & SoundClip::getName ( ) const

Gets the name of this SoundClip.

Returns
The name of this SoundClip.
uint16_t SoundClip::getNextUID ( )

Gets the next unique ID for a SoundClip.

void Module::SoundClip::setFrequency ( const unsigned int  f)
inline

Friends And Related Function Documentation

friend class AudioInterface
friend
friend class Book< SoundClip >
friend

Member Data Documentation

AudioInterface* Module::SoundClip::audio
protected

The audioInterface that created this SoundClip

unsigned int Module::SoundClip::frequency
protected

The frequency, in Hertz, of this SoundClip

std::string Module::SoundClip::name
protected

The name of this SoundClip

uint16_t Module::SoundClip::numInstances
protected

The number of instances (Sounds) of this SoundClip