[Speex-dev] question about coding
Erik de Castro Lopo
erikd-100 at mega-nerd.com
Fri May 26 15:13:30 PDT 2006
Leonardi Andrea wrote:
>
> Thanks for the answer.
> So data are stored in little-endian format on the WAVE file. But
> have I to encode in big endian format or little endian is ok?!
You need to pass the data in whatever is the native endian-ness
for your platform.
> >You are probably reading little-endian samples on a big-endian platform, and
> >failing to flip the byte order.
Using libsndfile (I am the author):
http://www.mega-nerd.com/libsndfile/
will make you life easier.
> >By convention, PCM samples are generally
> >little-endian words,
This is not right. Some file types are little endian (WAV for example)
others are big endian (ie AIFF). There is hwoever also a big endian
WAV variant (RIFX) and some AIFF files contain little endian data.
libsndfile handles all the above variations correctly.
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo
+-----------------------------------------------------------+
"Using Java as a general purpose application development language
is like going big game hunting armed with Nerf weapons."
-- Author Unknown
More information about the Speex-dev
mailing list