#include <codecs.h>
Inheritance diagram for H323StreamedAudioCodec:
Public Member Functions | |
H323StreamedAudioCodec (const char *mediaFormat, Direction direction, unsigned samplesPerFrame, unsigned bits) | |
virtual BOOL | EncodeFrame (BYTE *buffer, unsigned &length) |
virtual BOOL | DecodeFrame (const BYTE *buffer, unsigned length, unsigned &written, unsigned &samples) |
virtual int | Encode (short sample) const =0 |
virtual short | Decode (int sample) const =0 |
Protected Attributes | |
unsigned | bitsPerSample |
An application may create a descendent off this class and override functions as required for descibing a specific codec.
|
Create a new audio codec. This opens the standard PCM audio output device, for input and output and allows descendent codec classes to do audio I/O after decoding/encoding.
|
|
Decode a single sample value. Implemented in H323_ALawCodec, and H323_muLawCodec. |
|
Decode a sample block from the buffer specified. The samples must be placed into the writeBuffer member variable. It is expected that no more than frameSamples is decoded. The return value is the number of samples decoded. Zero indicates an error.
Reimplemented from H323FramedAudioCodec. |
|
Encode a single sample value. Implemented in H323_ALawCodec, and H323_muLawCodec. |
|
Encode a sample block into the buffer specified. The samples have been read and are waiting in the readBuffer member variable. it is expected this function will encode exactly encodedBlockSize bytes.
Implements H323FramedAudioCodec. |
|
|