Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

AudioSource Class Reference

#include <AudioSource.h>

Inheritance diagram for AudioSource:

Inheritance graph
[legend]
Collaboration diagram for AudioSource:

Collaboration graph
[legend]
List of all members.

Detailed Description

Audio data input.

Author:
Author
darkeye
Version:
Revision
1.9

Definition at line 91 of file AudioSource.h.

Public Member Functions

virtual ~AudioSource (void) throw ( Exception )
 Destructor.
unsigned int getChannel (void) const throw ()
 Get the number of channels for this AudioSource.
virtual bool isBigEndian (void) const throw ()
 Tell if the data from this source comes in big or little endian.
unsigned int getSampleRate (void) const throw ()
 Get the sample rate per seconds for this AudioSource.
unsigned int getBitsPerSample (void) const throw ()
 Get the number of bits per sample for this AudioSource.

Static Public Member Functions

static AudioSourcecreateDspSource (const char *deviceName, int sampleRate=44100, int bitsPerSample=16, int channel=2) throw ( Exception )
 Factory method for creating an AudioSource object of the appropriate type, based on the compiled DSP support and the supplied DSP name parameter.

Protected Member Functions

 AudioSource (unsigned int sampleRate=44100, unsigned int bitsPerSample=16, unsigned int channel=2) throw ( Exception )
 Constructor.
 AudioSource (const AudioSource &as) throw ( Exception )
 Copy Constructor.
virtual AudioSourceoperator= (const AudioSource &as) throw ( Exception )
 Assignment operator.


Constructor & Destructor Documentation

AudioSource::AudioSource unsigned int  sampleRate = 44100,
unsigned int  bitsPerSample = 16,
unsigned int  channel = 2
throw ( Exception ) [inline, 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.).
Exceptions:
Exception 

Definition at line 154 of file AudioSource.h.

AudioSource::AudioSource const AudioSource as  )  throw ( Exception ) [inline, protected]
 

Copy Constructor.

Parameters:
as the object to copy.
Exceptions:
Exception 

Definition at line 169 of file AudioSource.h.

virtual AudioSource::~AudioSource void   )  throw ( Exception ) [inline, virtual]
 

Destructor.

Exceptions:
Exception 

Definition at line 203 of file AudioSource.h.


Member Function Documentation

AudioSource * AudioSource::createDspSource const char *  deviceName,
int  sampleRate = 44100,
int  bitsPerSample = 16,
int  channel = 2
throw ( Exception ) [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:
deviceName 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.).
Exceptions:
Exception 

Definition at line 62 of file AudioSource.cpp.

References Reporter::reportEvent(), and Util::strEq().

unsigned int AudioSource::getBitsPerSample void   )  const throw () [inline]
 

Get the number of bits per sample for this AudioSource.

Returns:
the number of bits per sample.

Definition at line 251 of file AudioSource.h.

Referenced by AudioEncoder::AudioEncoder().

unsigned int AudioSource::getChannel void   )  const throw () [inline]
 

Get the number of channels for this AudioSource.

Returns:
the number of channels.

Definition at line 213 of file AudioSource.h.

Referenced by AudioEncoder::AudioEncoder().

unsigned int AudioSource::getSampleRate void   )  const throw () [inline]
 

Get the sample rate per seconds for this AudioSource.

Returns:
the sample rate per seconds.

Definition at line 239 of file AudioSource.h.

Referenced by AudioEncoder::AudioEncoder().

virtual bool AudioSource::isBigEndian void   )  const throw () [inline, 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

Reimplemented in AlsaDspSource, OssDspSource, and SolarisDspSource.

Definition at line 224 of file AudioSource.h.

Referenced by AudioEncoder::AudioEncoder().

virtual AudioSource& AudioSource::operator= const AudioSource as  )  throw ( Exception ) [inline, protected, virtual]
 

Assignment operator.

Parameters:
as the object to assign to this one.
Returns:
a reference to this object.
Exceptions:
Exception 

Definition at line 183 of file AudioSource.h.

References Source::operator=().

Referenced by SolarisDspSource::operator=(), OssDspSource::operator=(), and AlsaDspSource::operator=().


The documentation for this class was generated from the following files:
Generated on Sat Oct 22 13:17:06 2005 for DarkIce by  doxygen 1.4.4