Archived:Payload conversion for G.729 audio format
This article describes an approach to payload conversion for the G.729 audio format.
G.729 Audio data recorded on S60 devices is encoded in 16-bit aligned frame format. For example, a single G.729 full rate frame with 80 bits (10 bytes) of payload, takes 22 bytes when encoded on an S60 device. An additional 2-byte header with frame type information is used in the beginning, bringing the total frame length to 24 bytes. When playing back G.729 data, the audio device expects the frames to be in this 24-byte format as well.
Details of the G.729 frame format are described in the Audio Proxy Server specification document.
For VoIP applications using G.729, this means that conversion is required between the two frame formats.
A reference implementation for compressing a 22-byte G.729 payload to 10 bytes (and vice versa) is available File:G729bitstream.zip.
The code can handle also SID frames (for VAD support as specified in G.729 Annex B).