AudioCodec Class Reference

[ARTS Index] [ARTS Heirarchy]


Base class for all audio codecs. More...

#include <audio.h>

Public Members


Detailed Description

The abstract audio codec base class is used to define common inheretance for all audio codec handlers. This allows reference to an effective codec for the current payload format through a pointer as used in the RTPAudio classes.


virtual size_t Encode(unsigned char *target, unsigned char *source, size_t len)

Encode an audio stream in the current format. This normally is used to compress u-law 8bit 8khz audio in derived classes as all higher sampled audio is generally not codec processed. The default codec simply copies the data stream.

Parameters:
source data to read from.
len in bytes of original data stream.
target to write codec converted data.
Returns:
number of bytes after codec or 0 if unsupported sampling.

virtual size_t Decode(unsigned char *target, unsigned char *source, size_t len)

Decode an audio stream in the current payload format. This normally is used to decompress into u-law 8 bit 8khz audio in derived classes as all higher sampled audio is generally not compressed.

Parameters:
source of encoded audio data.
len of encoded audio data.
target for decoded audio data.
Returns:
number of bytes after codec or 0 if unsupported sampling.

  • Author: David Sugar (dyfet@ostel.com)
  • Documentation generated by dyfet@home.tycho.com on Fri Jul 2 11:43:56 EDT 1999
Kdoc