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

AudioEncoder Class Reference

#include <AudioEncoder.h>

Inheritance diagram for AudioEncoder:

Inheritance graph
[legend]
Collaboration diagram for AudioEncoder:

Collaboration graph
[legend]
List of all members.

Detailed Description

An audio encoder.

Author:
Author
jbebel
Version:
Revision
1.9

Definition at line 58 of file AudioEncoder.h.

Public Types

enum  BitrateMode { cbr, abr, vbr }
 Type to specify bitrate mode. More...

Public Member Functions

virtual ~AudioEncoder (void) throw ( Exception )
 Destructor.
int getInChannel (void) const throw ()
 Get the number of channels of the input.
bool isInBigEndian (void) const throw ()
 Tell if the input is big or little endian.
int getInSampleRate (void) const throw ()
 Get the sample rate of the input.
int getInBitsPerSample (void) const throw ()
 Get the number of bits per sample of the input.
int getOutChannel (void) const throw ()
 Get the number of channels of the output.
int getOutSampleRate (void) const throw ()
 Get the sample rate of the output.
BitrateMode getOutBitrateMode (void) const throw ()
 Get the bit rate mode of the output.
unsigned int getOutBitrate (void) const throw ()
 Get the bit rate of the output in kbits/sec, for fixed bitrate encodings.
double getOutQuality (void) const throw ()
 Get the encoding quality of the output, for variable bitrate encodings.
virtual bool isRunning (void) const =0 throw ()
 Check wether encoding is in progress.
virtual bool start (void)=0 throw ( Exception )
 Start encoding.
virtual void stop (void)=0 throw ( Exception )
 Stop encoding.

Protected Member Functions

 AudioEncoder (void) throw ( Exception )
 Default constructor.
 AudioEncoder (unsigned int inSampleRate, unsigned int inBitsPerSample, unsigned int inChannel, bool inBigEndian, BitrateMode outBitrateMode, unsigned int outBitrate, double outQuality, unsigned int outSampleRate=0, unsigned int outChannel=0) throw ( Exception )
 Constructor.
 AudioEncoder (const AudioSource *as, BitrateMode outBitrateMode, unsigned int outBitrate, double outQuality, unsigned int outSampleRate=0, unsigned int outChannel=0) throw ( Exception)
 Constructor.
 AudioEncoder (const AudioEncoder &encoder) throw ( Exception )
 Copy constructor.
virtual AudioEncoderoperator= (const AudioEncoder &encoder) throw ( Exception )
 Assignment operator.


Member Enumeration Documentation

enum AudioEncoder::BitrateMode
 

Type to specify bitrate mode.

Possible values:

  • cbr - constant bitrate mode described by bitrate
  • abr - average bitrate mode described by an average bitrate and quality
  • vbr - variable bitrate mode described by quality
Enumeration values:
cbr 
abr 
vbr 

Definition at line 70 of file AudioEncoder.h.


Constructor & Destructor Documentation

AudioEncoder::AudioEncoder void   )  throw ( Exception ) [inline, protected]
 

Default constructor.

Always throws an Exception.

Exceptions:
Exception 

Definition at line 177 of file AudioEncoder.h.

AudioEncoder::AudioEncoder unsigned int  inSampleRate,
unsigned int  inBitsPerSample,
unsigned int  inChannel,
bool  inBigEndian,
BitrateMode  outBitrateMode,
unsigned int  outBitrate,
double  outQuality,
unsigned int  outSampleRate = 0,
unsigned int  outChannel = 0
throw ( Exception ) [inline, protected]
 

Constructor.

Parameters:
inSampleRate sample rate of the input.
inBitsPerSample number of bits per sample of the input.
inChannel number of channels of the input.
inBigEndian shows if the input is big or little endian
outBitrateMode the bit rate mode of the output.
outBitrate bit rate of the output (kbits/sec).
outQuality the quality of the stream.
outSampleRate sample rate of the output. If 0, inSampleRate is used.
outChannel number of channels of the output. If 0, inChannel is used.
Exceptions:
Exception 

Definition at line 199 of file AudioEncoder.h.

AudioEncoder::AudioEncoder const AudioSource as,
BitrateMode  outBitrateMode,
unsigned int  outBitrate,
double  outQuality,
unsigned int  outSampleRate = 0,
unsigned int  outChannel = 0
throw ( Exception) [inline, protected]
 

Constructor.

Parameters:
as get input sample rate, bits per sample and channels from this AudioSource.
outBitrateMode the bit rate mode of the output.
outBitrate bit rate of the output (kbits/sec).
outQuality the quality of the stream.
outSampleRate sample rate of the output. If 0, input sample rate is used.
outChannel number of channels of the output. If 0, input channel is used.
Exceptions:
Exception 

Definition at line 236 of file AudioEncoder.h.

AudioEncoder::AudioEncoder const AudioEncoder encoder  )  throw ( Exception ) [inline, protected]
 

Copy constructor.

Parameters:
encoder the AudioEncoder to copy.

Definition at line 261 of file AudioEncoder.h.

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

Destructor.

Exceptions:
Exception 

Definition at line 310 of file AudioEncoder.h.


Member Function Documentation

int AudioEncoder::getInBitsPerSample void   )  const throw () [inline]
 

Get the number of bits per sample of the input.

Returns:
the number of bits per sample of the input.

Definition at line 354 of file AudioEncoder.h.

int AudioEncoder::getInChannel void   )  const throw () [inline]
 

Get the number of channels of the input.

Returns:
the number of channels of the input.

Definition at line 321 of file AudioEncoder.h.

int AudioEncoder::getInSampleRate void   )  const throw () [inline]
 

Get the sample rate of the input.

Returns:
the sample rate of the input.

Definition at line 343 of file AudioEncoder.h.

unsigned int AudioEncoder::getOutBitrate void   )  const throw () [inline]
 

Get the bit rate of the output in kbits/sec, for fixed bitrate encodings.

Returns:
the bit rate of the output.

Definition at line 399 of file AudioEncoder.h.

BitrateMode AudioEncoder::getOutBitrateMode void   )  const throw () [inline]
 

Get the bit rate mode of the output.

Returns:
the bit rate mode of the output.

Definition at line 387 of file AudioEncoder.h.

int AudioEncoder::getOutChannel void   )  const throw () [inline]
 

Get the number of channels of the output.

Returns:
the number of channels of the output.

Definition at line 365 of file AudioEncoder.h.

double AudioEncoder::getOutQuality void   )  const throw () [inline]
 

Get the encoding quality of the output, for variable bitrate encodings.

Returns:
the encoding quality of the output.

Definition at line 411 of file AudioEncoder.h.

int AudioEncoder::getOutSampleRate void   )  const throw () [inline]
 

Get the sample rate of the output.

Returns:
the sample rate of the output.

Definition at line 376 of file AudioEncoder.h.

bool AudioEncoder::isInBigEndian void   )  const throw () [inline]
 

Tell if the input is big or little endian.

Returns:
true if the input is big endian, false if little endian.

Definition at line 332 of file AudioEncoder.h.

virtual bool AudioEncoder::isRunning void   )  const throw () [pure virtual]
 

Check wether encoding is in progress.

Returns:
true if encoding is in progress, false otherwise.

Implemented in LameLibEncoder, and VorbisLibEncoder.

virtual AudioEncoder& AudioEncoder::operator= const AudioEncoder encoder  )  throw ( Exception ) [inline, protected, virtual]
 

Assignment operator.

Parameters:
encoder the AudioEncoder to assign this to.
Returns:
a reference to this AudioEncoder.
Exceptions:
Exception 

Definition at line 282 of file AudioEncoder.h.

Referenced by VorbisLibEncoder::operator=(), and LameLibEncoder::operator=().

virtual bool AudioEncoder::start void   )  throw ( Exception ) [pure virtual]
 

Start encoding.

This function returns as soon as possible, with encoding started in the background.

Returns:
true if encoding has started, false otherwise.
Exceptions:
Exception 

Implemented in LameLibEncoder, and VorbisLibEncoder.

virtual void AudioEncoder::stop void   )  throw ( Exception ) [pure virtual]
 

Stop encoding.

Stops the encoding running in the background.

Exceptions:
Exception 

Implemented in LameLibEncoder, and VorbisLibEncoder.


The documentation for this class was generated from the following file:
Generated on Thu Apr 14 13:59:13 2005 for DarkIce by  doxygen 1.4.1