[Speex-dev] S32_LE to S16_LE

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Fri Mar 13 16:50:05 PDT 2009


Alvaro Jimenez a écrit :
> I need to run speex on a FPU-less platform with an audio card that only 
> reads samples of type S32_LE (even when it is a 16bits audio card). I 
> understand that if my platform is FPU-less then I should use 
> speex_encode/decode_int() but then, how can I convert my S32_LE sample 
> to S16_LE in order to pass it to speex functions ?

I can see two options. The first is to shift the bits right by the 16.
The other is to hold the bits and shift the rest of the CPU left by 16.

	Jean-Marc


More information about the Speex-dev mailing list