On Saturday 07 March 2009 7:20:00 am vexator wrote:
> Ah, so the size of the buffer was hard-coded in the sample. I didn't
> realize. But isn't there a simpler way to find out how big the buffer has
> to be? Can I, from the data provided by the OggVorbis lib, calculate the
> exact length of the file and from that the needed buffer size? I'm new to
> audio programming, so I'm not sure how to do it.
It looks like ov_pcm_total can get the number of pcm sample frames (multiplied
by 2*channels for the number of bytes). Though, I assume this would only work
on seekable complete files, which isn't necessarily guaranteed to be true if
it's user-replaceable. Non-seekable files would likely return 0 or negative
for the size, so you would need to do the method I described earlier for them.
_______________________________________________
Openal-devel mailing list
Openal-devel@...
http://opensource.creative.com/mailman/listinfo/openal-devel