WAV chunks (It was: [vorbis] Low sample rates / bit rates)

Michael Smith msmith at labyrinth.net.au
Mon Nov 27 03:37:51 PST 2000



At 11:08 AM 11/27/00 +0100, you wrote:
>Hello,
>
>In the past I had sent to the list a new WAV parser, it is not integrated 
>in the vorbis stuff because it has been developed isolated but it should be 
>very easy to inject in the OggEnc code, and it should do a good job with 
>WAV chunks and with damaged WAV files.
>
>This file was never injected in the code and my post never replayed, maybe 
>you (and the other developers) never saw it :-? Anyway, here is the code.

The code was never used because it's overly complex. It's  about 300 lines,
compared to less than half that for what's in oggenc now (note that the
code in oggenc does everything that this does, as far as I can see). It's
also significantly less portable (it has big problems with struct padding,
int sizes, and endianness - there's no guarantee it'll even work on x86).

It'll accept the wave file that we were discussing here - but only because
it ignores extra data (extra data which, according to all the docs I can
find, shouldn't be there) in the format chunk.

The code I've written for oggenc accepts every wav file that I've seen (as
long as it's just 16 bit PCM) that is valid according to the documentation
I've found. 

It also works fine with truncated files, files with incorrect lengths given
(in the data chunk, for instance), and so on. The common problems with wave
files.

In short, I don't see any reason to replace what is already there. However,
if I'm presented with documentation explaining the extra bytes in the fmt
chunks of some wave files, I'll definately add support for that. I don't
like the idea of just ignoring it, though.

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis mailing list