class AudioSource

Audio data input More...

Contains pure virtuals
Definition#include <AudioSource.h>
InheritsReporter [public virtual ], Source [public ]
Inherited byAlsaDspSource, OssDspSource, SolarisDspSource
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Methods

Private Methods

Private Members


Detailed Description

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:
sampleRatesamples per second.
bitsPerSamplebits per sample.
channelnumber 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:
sampleRatesamples per second (e.g. 44100 for 44.1kHz).
bitsPerSamplebits per sample (e.g. 16 bits).
channelnumber 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:
sourcethe object to copy.

Throws: Exception

inline AudioSource &  operator= ( const AudioSource & as )
throw ( Exception )

operator=

[protected virtual]

Assignment operator.

Parameters:
asthe 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:
namethe audio device (/dev/dspX, hwplug:0,0, etc)
sampleRatesamples per second (e.g. 44100 for 44.1kHz).
bitsPerSamplebits per sample (e.g. 16 bits).
channelnumber of channels of the audio source (e.g. 1 for mono, 2 for stereo, etc.).

Throws: Exception