[vorbis-dev] Reading OGG embedded in a pack file

Michael Smith msmith at xiph.org
Mon May 3 22:17:02 PDT 2004



On Tuesday 04 May 2004 14:58, Ken Rogoway wrote:
> Michael,
>
> I respect your knowledge and apologize if I am trying to do something that
> is poor application design.  Having coded for over 20 years I would like
> to think that I should know better, but I am a bit stumped as to how I can
> have 100+ different OGG files inside a large package file, and then when
> needed go and grab a single OGG file from the package to decode it for
> the SDL_mixer which expects a properly decoded wave buffer.  If you have
> some thoughts on how best to approach this I would greatly appreciate your
> sharing them with me.
>
> I guess my biggest problem is that I am trying to take two 3rd party
> libraries
> and make them work with a pack file scheme.  It sounds like I am being an
> idiot in my approach.  Please explain a better way to do this.

It sounds like the problem if SDL_mixer - if it expects (and provides NO other 
alternative) a single buffer for the entire stream, then either it's just 
badly designed, or it's a poor fit for what you're trying to do. The other 
possibility is that there _is_ some other way to get data into SDL_mixer - if 
there is, then you should probably be using that. 

The problem isn't libvorbisfile or your pack-file-scheme (this works fine: as 
I said, you can make this work perfectly if you treat it as a true 
seekable-file - and from what you said it is). 

You're not being an idiot (and I didn't mean to imply that you were, just to 
suggest that there ARE better approaches), I'm just suggesting some ways to 
make your application work better. 

Not being familiar with SDL_mixer, I can't suggest what exactly you should be 
doing with it to make this work more sensibly, sorry.

Mike

--- >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