|
|
Audio data input
unsigned int channel | channel |
[private]
unsigned int sampleRate | sampleRate |
[private]
unsigned int bitsPerSample | bitsPerSample |
[private]
inline void
init ( unsigned int sampleRate,
unsigned int bitsPerSample,
unsigned int channel )
throw ( Exception ) | init |
[private]
Initialize the object.
Parameters:
sampleRate | samples per second. |
bitsPerSample | bits per sample. |
channel | number of channels of the audio source. |
Throws: Exception
inline void
strip ( void )
throw ( Exception ) | strip |
[private]
De-initialize the object.
Throws: Exception
inline
AudioSource ( unsigned int sampleRate = 44100,
unsigned int bitsPerSample = 16,
unsigned int channel = 2 )
throw ( Exception ) | AudioSource |
[protected]
Constructor. Because all values have defaults, this is also the default constructor.
Parameters:
sampleRate | samples per second (e.g. 44100 for 44.1kHz). |
bitsPerSample | bits per sample (e.g. 16 bits). |
channel | number of channels of the audio source (e.g. 1 for mono, 2 for stereo, etc.). |
Throws: Exception
inline
AudioSource ( const AudioSource & as )
throw ( Exception ) | AudioSource |
[protected]
Copy Constructor.
Parameters:
source | the object to copy. |
Throws: Exception
inline AudioSource &
operator= ( const AudioSource & as )
throw ( Exception ) | operator= |
[protected virtual]
Assignment operator.
Parameters:
as | the object to assign to this one. |
Returns: a reference to this object.
Throws: Exception
Reimplemented from Source.
inline
~AudioSource ( void )
throw ( Exception ) | ~AudioSource |
[virtual]
Destructor.
Throws: Exception
inline unsigned int
getChannel ( void )
throw () | getChannel |
[const]
Get the number of channels for this AudioSource.
Returns: the number of channels.
bool
isBigEndian ( void )
throw () | isBigEndian |
[const pure virtual]
Tell if the data from this source comes in big or little endian.
Returns: true if the data is big endian, false if little endian
inline unsigned int
getSampleRate ( void )
throw () | getSampleRate |
[const]
Get the sample rate per seconds for this AudioSource.
Returns: the sample rate per seconds.
inline unsigned int
getBitsPerSample ( void )
throw () | getBitsPerSample |
[const]
Get the number of bits per sample for this AudioSource.
Returns: the number of bits per sample.
AudioSource *
createDspSource ( const char * deviceName,
int sampleRate = 44100,
int bitsPerSample = 16,
int channel = 2)
throw ( Exception ) | createDspSource |
[static]
Factory method for creating an AudioSource object of the appropriate type, based on the compiled DSP support and the supplied DSP name parameter.
Parameters:
name | the audio device (/dev/dspX, hwplug:0,0, etc) |
sampleRate | samples per second (e.g. 44100 for 44.1kHz). |
bitsPerSample | bits per sample (e.g. 16 bits). |
channel | number of channels of the audio source (e.g. 1 for mono, 2 for stereo, etc.). |
Throws: Exception