[vorbis-dev] Wave Header Question

volsung at asu.edu volsung at asu.edu
Sun Jan 14 08:52:54 PST 2001

I'm reordering the code in ao_wav.c that writes wav files to prevent the
problem we had earlier.  If ogg123 was improperly terminated (Segfault, 
kill -9, etc.), the output wav file was not even recognizable because the
header was totally blank.

I have found that at the start of playback (from libao's perspective), I know
all of the wav header info except two things:

1) The length of the RIFF chunk. (filesize - 8, in our case)
2) The length of the data chunk. (filesize - 44, in our case)

Assuming I have no idea how long the file is going to be, what are sane values
to put in for these lengths ahead of time?  I find if I put 0, the sox
frontend "play" will just play nothing (it actually pays attention to the

Basically, wav files don't seem like they should be streamable anyway, so you
shouldn't use them for that purpose.  However, since I have to pick something
to put in those blanks, I want something that will be useful in the most

[The long term solution is to create a raw device that just dumps the data so
you can massage it into whatever format you like.]

Oh yeah, Ken, commit the buffer_shutdown patch in CVS so wav writing works
again, please!!

Stan Seibert

--- >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-dev-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-dev mailing list