Covox ADPCM: Difference between revisions
(That's all I know about it) |
No edit summary |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
* Samples: [http://samples.mplayerhq.hu/A-codecs/CovoxFormats/ http://samples.mplayerhq.hu/A-codecs/CovoxFormats/] | * Samples: [http://samples.mplayerhq.hu/A-codecs/CovoxFormats/ http://samples.mplayerhq.hu/A-codecs/CovoxFormats/] | ||
This is a family of [[ADPCM]] formats used for compressing 8-bit unsigned [[PCM]] for Covox Sound Master. There are 2-,3- and 4-bit ADPCM formats. | This is a family of [[ADPCM]] formats used for compressing 8-bit unsigned [[PCM]]. They were invented by Covox for use with the Covox Speech Thing, Sound Master, and other Covox sound output devices. There are 2-,3- and 4-bit ADPCM formats. | ||
== Header == | == Header == | ||
File header consists of 16 bytes: | File header consists of 16 bytes: | ||
FF 55 FF AA FF 55 FF AA | FF 55 FF AA FF 55 FF AA xx yy pp pp pp pp 00 00 | ||
xx - encoding type | |||
unknown/unused | yy - playback rate (rate != sample rate, rather the timer tick rate divisor used for playback) | ||
pp - unsigned longint meant to indicate unpacked size (mostly unused) | |||
00 - unknown/unused | |||
Type may be one of the following: | Type may be one of the following: | ||
* 0x08 - raw 8-bit unsigned PCM | |||
* 0x82 - 2-bit ADPCM | * 0x01 - 1-bit ADPCM | ||
* 0x83 - 3-bit ADPCM | * 0x02 - 2-bit ADPCM | ||
* 0x84 - 4-bit ADPCM | * 0x03 - 3-bit ADPCM | ||
* 0x04 - 4-bit ADPCM | |||
* 0x08 - raw 8-bit unsigned PCM | |||
* 0x81 - 1-bit ADPCM with silence encoding | |||
* 0x82 - 2-bit ADPCM with silence encoding | |||
* 0x83 - 3-bit ADPCM with silence encoding | |||
* 0x84 - 4-bit ADPCM with silence encoding | |||
* 0x88 - 8-bit PCM with silence encoding | |||
The first 8 bytes are a unique code guaranteed not to show up inside the rest of file. This means that multiple PCM files can be concatenated together and the locations found by looking for the headers. | |||
== Markers == | == Markers == | ||
There are two types of markers known: | There are two types of markers known: | ||
Line 23: | Line 36: | ||
* FF AA AA AA - end of sound | * FF AA AA AA - end of sound | ||
For 3-bit ADPCM they are cut to 3 bytes (FF 55 55 and FF AA AA respectively). | |||
3 | |||
After silence block ADPCM decoding state should be reset. | |||
== | == ADPCM decoding == | ||
The Covox method of ADPCM does not match other methods; please see the SPUTTER source code by Adrienne Cousins for one implementation of how to decode Covox ADPCM. | |||
[[Category:Audio Codecs]] | [[Category:Audio Codecs]] | ||
[[Category:ADPCM Audio Codecs]] | [[Category:ADPCM Audio Codecs]] | ||
[[Category:Undiscovered Audio Codecs]] | [[Category:Undiscovered Audio Codecs]] |
Latest revision as of 01:11, 16 January 2017
- Company: Covox
- Samples: http://samples.mplayerhq.hu/A-codecs/CovoxFormats/
This is a family of ADPCM formats used for compressing 8-bit unsigned PCM. They were invented by Covox for use with the Covox Speech Thing, Sound Master, and other Covox sound output devices. There are 2-,3- and 4-bit ADPCM formats.
Header
File header consists of 16 bytes:
FF 55 FF AA FF 55 FF AA xx yy pp pp pp pp 00 00 xx - encoding type yy - playback rate (rate != sample rate, rather the timer tick rate divisor used for playback) pp - unsigned longint meant to indicate unpacked size (mostly unused) 00 - unknown/unused
Type may be one of the following:
- 0x01 - 1-bit ADPCM
- 0x02 - 2-bit ADPCM
- 0x03 - 3-bit ADPCM
- 0x04 - 4-bit ADPCM
- 0x08 - raw 8-bit unsigned PCM
- 0x81 - 1-bit ADPCM with silence encoding
- 0x82 - 2-bit ADPCM with silence encoding
- 0x83 - 3-bit ADPCM with silence encoding
- 0x84 - 4-bit ADPCM with silence encoding
- 0x88 - 8-bit PCM with silence encoding
The first 8 bytes are a unique code guaranteed not to show up inside the rest of file. This means that multiple PCM files can be concatenated together and the locations found by looking for the headers.
Markers
There are two types of markers known:
- FF 55 55 55 - silence block, next 16-bit little-endian value specifies number of silence samples - 27
- FF AA AA AA - end of sound
For 3-bit ADPCM they are cut to 3 bytes (FF 55 55 and FF AA AA respectively).
After silence block ADPCM decoding state should be reset.
ADPCM decoding
The Covox method of ADPCM does not match other methods; please see the SPUTTER source code by Adrienne Cousins for one implementation of how to decode Covox ADPCM.