[speex-dev] Decoding raw problem on OS X with 1.03

Wade Williams
2004-08-06T15:02:00Z

Hi all,

I've built Speex 1.03 on Mac OS X.

I encoded a raw PCM file successfully using:

/usr/local/bin/speexenc raw_samples.raw --rate 44100 --be --16bit
raw_enc.spx
Warning: Speex is only optimized for 8, 16 and 32 kHz. It will still
work at 44100 Hz but your mileage may vary
Encoding 44100 Hz audio using ultra-wideband (sub-band CELP) mode (mono)

If I decode to .wav, it works fine.  However, if I decode to .raw, it
does not work (the decoded file when viewed on GoldWave on Windows
appears to be all noise.  I've tried 16-bit, signed, unsigned, big
endian and little endian, mono and stereo PCM - none make a difference
- the decoded file always appears to be noise).

Here's the decode I did:
/usr/local/bin/speexdec raw_enc.spx raw_dec.raw
Decoding 44100 Hz audio using ultra-wideband (sub-band CELP) mode (mono)
Encoded with Speex 1.0.3

Has anyone run into this before?

And if I can tack on one more question:

On 1.03, the second parameter to speex_encode is a float *.  But on
1.14, it's a short *.  Why the change?

Thanks,

Wade