[vorbis-dev] Problem with ov_read_float()
David Mitchell
vorbis at themitchells.org
Wed Jan 16 19:00:47 PST 2002
Greetings,
I'm having some sort of problem using ov_read_float(). Everything looks
good to me, but I'm trashing memory somehow, so clearly I'm screwing
something up. What confuses me is why it takes a ***float for the
buffer.
I call it like so:
float **buffer
bytes_read = ov_read_float(&vf, &buffer, 0)
memcpy (b, *buffer, 0);
This compiles fine, but after a few reads, libvorbis crashes
internally at random spots. If I take out the memcpy, it runs
fine. I'm 99% certain that I'm trashing memory somewhere, but
it's not clear why.
The ov_read_float docs give this as "Typical usage", but it doesn't
even compile under gcc, so it's clearly wrong:
float **pcm; bytes_read=ov_read_float(&vf,pcm,¤t_section);
Can anyone tell me what I'm missing? I'm sure there is a good reason
that pcm_channels is a triple pointer, but I don't see what it is. It seems
to me that a double pointer would work fine. Thanks in advance,
-David Mitchell
--- >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