Jump to content
  • Advertisement
Sign in to follow this  
Jamoflaw

Ogg Vorbis and PhysicsFS

This topic is 2612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I have my OggVorbis + OpenAL engine all setup and working... my issue is with now I am looking at packing all the gamefiles into a zip or similar and am having issues getting Ogg Vorbis to work with the file in memory rather than the straight FILE* pointer I use currently.

I have started reading about the Ov_CALLBACKS functions and the custom struct but am a little confused about what is expected from the functions!

Hope someone can help!


James

Share this post


Link to post
Share on other sites
Advertisement
I had to do this at one point as well.

The functions to which you refer provide an abstraction of the data source. IIRC, there are four functions, including functions for reading, advancing, etc. I think the functions correspond in functionality and behavior to various file-related functions from the C standard library (and in fact the function pointers point to these functions when the data is read from a file). You'll need to provide functions that mimic this behavior, but instead read the data from a block of memory. (SDL's 'rwops' functionality provides a similar abstraction.)

If you get stuck on this, I can probably dig up that code and provide some more details on the process.

Share this post


Link to post
Share on other sites

I had to do this at one point as well.

The functions to which you refer provide an abstraction of the data source. IIRC, there are four functions, including functions for reading, advancing, etc. I think the functions correspond in functionality and behavior to various file-related functions from the C standard library (and in fact the function pointers point to these functions when the data is read from a file). You'll need to provide functions that mimic this behavior, but instead read the data from a block of memory. (SDL's 'rwops' functionality provides a similar abstraction.)

If you get stuck on this, I can probably dig up that code and provide some more details on the process.


Ah cool, thanks! I will give it a go! Might take a couple of days in between the study but I will let you know progress!!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!