Re: [LAU] How to decode raw ADPCM data?

From: Erik de Castro Lopo <mle+la@email-addr-hidden-nerd.com>
Date: Thu Mar 13 2008 - 05:25:15 EET

Jozef Henzl wrote:

> Hello,
> Does anyone know which tool or library i can use to decode audio data stored
> in a ADPCM header-less file?

There are about 700 different ADPCM algorithms and if you don't have the
correct one, it will not decode correctly.

> (8kHz, 1 channel, (12,16,25 or 32) bit)
> I've tried sox and libsamplerate,

libsamplerate? Sure you don't mean libnsdile?

Try the sndfile-info program on the file. If there is a file header, that
program should find it and do the right thing.

If there is no file header, there is a decent chance that the file is VOX
ADPCM encoded. To test this, rename the file so it has a ".vox" file
extention and then try opening the file with a sound file editor which
uses libsndfile (eg Sweep or Audacity). If it opens, look at the file
and see if it plays back correctly. If it does, then it was indeed a
VOC ADOCM file.

> The data are from a voice-recording machine, with very limited documentation.

Probably VOX, which is indeed headerless. For any headerless file which
has a ".vox" extention, will be assumed to be VOX ADPCM.

> sfinfo.format = SF_FORMAT_IMA_ADPCM | SF_FORMAT_RAW;

If the file does not have a header, the above is 99.9% guaranteed to be
wrong. IMA ADPCM specifies an algorithm, which is so poorly specified
that I know of at least 3 implementations.

Erik

-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"I ran it on my DeathStation 9000 and demons flew out of my nose." --Kaz
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Thu Mar 13 08:15:03 2008

This archive was generated by hypermail 2.1.8 : Thu Mar 13 2008 - 08:15:03 EET