Closed eblanca closed 6 years ago
Within libtwolame, 16-bit integers are all host native endian (ie x86 is little-endian and PPC is big-endian).
So endian conversion is only needed when loading input files. libsndfile will deal with the endianess for us. So you are right, conversion is should only needed for raw files.
It is possible there are also other edge-cases, where you need to correct a malformed file.
Can you provide (link to) such a corrupted/malformed file? I would like to run some tests on it.
I was able to read (and encode) a raw file using libsndfile, via audioin_sndfile.c.
This could mean twolame does not need the audioin_raw.c
module anymore, as the audioin_sndfile.c
can do anything the former did.
Can a patch for this be relevant/interesting ?
Pull Request #71 addresses this.
In frontend.c I see endian-ness care is taken for some difficult audio sources. Now, is this needed when dealing with input samples coming from libsndfile? Or is this just needed in case of raw sample sources? I think the latter case is true (after all, if the frontend calls libsndfile services is because we trust them), so this special handling should be only done as part of raw input routines... What do you think about this?