[Vorbis] Plain playback

Niels Gorisse toemtoem at hotmail.com
Mon Sep 6 09:00:19 PDT 2004


Hi all,

Perhaps a stupid question, but I just need pieces of audio from a file. I 
know I have to use vorbisfile, and the example compiles, but I don't know 
how to read the buffer. In fact, it's not even documented (or I'm looking at 
the wrong place). I assumed it was a interleaved buffer containing unsigned 
shorts, but that didn't work.

I also tried the normal decode example, that one sounded great (attaching a 
real file and audio hardware to it), but I didn't succeed in remove the 
three (yes, three!!) while loops around the actual retrieval of audio 
samples, without breaking the code. Aghr - while loops, terrible. What a 
weird way of writing decoding - doesn't everybody just want a plain function 
with retrieveBuffer(float**inhere) just like ov_read() is?

Thanks in advance for any help (either a non-looped version of the decoding 
example, or a piece of code how to read the ov_read() buffer would do),

Niels

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



More information about the Vorbis mailing list