[Vorbis-dev] Reading from memory and ov_open

Szinger, Martin R. Martin.Szinger at gd-ais.com
Thu Jun 30 08:11:28 PDT 2005


Hi,

I've been working with oggvorbis-win32sdk-1.0.1 and have a
semi-hypothetical question.

Let's suppose that, for whatever reason, I've allocated a block of
memory, and I've loaded into this memory a perfectly valid ogg vorbis
file.

Now I'd like to decode this vorbis data, but I'm stuck calling ov_open()
because I don't have a FILE*, I have a block of memory. (This may in
fact be an ignorant stdio question on my part; if so, I apologize). But
- what do I do?

(Sure, I could push this memory back down into a temp file and decode
that, but that seems terribly wasteful....)

Certainly the capability exists to decode a block of vorbis data in
memory that's not necessarily backed by a file on disk? I haven't been
able to find an example, though. Please help me.

Thanks,
M. Szinger



More information about the Vorbis-dev mailing list