Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: Zap::VoiceEncoder Class Reference

# Zap::VoiceEncoder Class Reference

`#include <voiceCodec.h>`

Inheritance diagram for Zap::VoiceEncoder:

## Detailed Description

The VoiceEncoder class is an abstract base class for the various voice compression algorithms supported by Zap - initially just the HawkVoice variable bitrate LPC10 codec.

It takes an arbitrary buffer of 16 bit samples at 8KHz and returns a compressed buffer. The original buffer is modified to contain any samples that were not used due to unfilled frame sizing.

## Public Member Functions

ByteBufferPtr | compressBuffer (ByteBufferPtr sampleBuffer)

## Private Member Functions

virtual U32 | getSamplesPerFrame ()=0
virtual U32 | getMaxCompressedFrameSize ()=0
virtual U32 | compressFrame (S16 *samplePtr, U8 *outputPtr)=0

## Member Function Documentation

virtual U32 Zap::VoiceEncoder::getSamplesPerFrame | ( |  | ) | `[private, pure virtual]`

Implemented in Zap::LPC10VoiceEncoder, and Zap::GSMVoiceEncoder.

virtual U32 Zap::VoiceEncoder::getMaxCompressedFrameSize | ( |  | ) | `[private, pure virtual]`

Implemented in Zap::LPC10VoiceEncoder, and Zap::GSMVoiceEncoder.

virtual U32 Zap::VoiceEncoder::compressFrame | ( | S16 * | samplePtr,
|  | U8 * | outputPtr |
| ) |  |  | `[private, pure virtual]`

Implemented in Zap::LPC10VoiceEncoder, and Zap::GSMVoiceEncoder.

ByteBufferPtr Zap::VoiceEncoder::compressBuffer | ( | ByteBufferPtr | sampleBuffer | ) |