[vorbis] Mixing libvorbisfile with SDL

Alexander Markley alex at milent.com
Sat Sep 20 07:35:48 PDT 2003



Quite right. I noticed the subtle allusion to vorbisfile closing the 
file itself after I posted my previous message.

My statement still stands however: The library is not behaving as 
expected by closing a FILE * that I had to open, therefore, extra 
mention should be made in the docs wherever appropriate. (IMHO, of 
course.) :)

Everything is working fine now. I've built bleeding edge versions of 
libvorbis on all of my compile farm machines, and my app has never been 
so stable. (Now that I've stopped fclose()ing all of my vorbis files 
twice...)

--Alex

Stan Seibert wrote:
> It is technically in the docs:
> 
> "After a bitstream has been opened using ov_open()/ov_open_callbacks() 
> and  decoding  is  complete,  the application  must  call  ov_clear() to
> clear the decoder's buffers and close the file." [From
> doc/vorbisfile/ov_clear.html]
> 
> Though the wording might be made stronger to emphasize this
> non-intuitive point.  :)
> 
> ---
> Stan Seibert
> 
> 
> On Fri, 2003-09-19 at 07:15, Alexander Markley wrote:
> 
>>LOL! That was the problem the whole time?!
>>
>>Hehe, maybe you guys should make a note about ov_clear closing the file 
>>in the docs. I only expect a library to behave that way if I wasn't 
>>responsible for opening the file in the first place.
>>
>>Either way, it seems that everything is working now. (If it starts 
>>flubbing again, I'll just bug you guys some more.) :-P
>>
>>Thanks again. Keep up the good work with all of this software, Xiph. 
>>Now, if I can just get my hands on a good CD-based portable vorbis player...
>>
>>--Alex
>>
>>Stan Seibert wrote:
>>
>>>Is this at all related to ov_clear() closing the file, and then the
>>>program later closing the file again?  That's the most common mistake
>>>I've seen.
>>>
>>>Otherwise, it sounds like a strange memory corruption issue.  valgrind
>>>and/or Electric Fence are good for tracking those down.
>>>
>>>---
>>>Stan Seibert
>>>
>>>
>>>On Thu, 2003-09-18 at 22:14, Alexander Markley wrote:
>>>
>>>
>>>>I am having no luck at all mixing libvorbisfile with the cross-platform 
>>>>gaming library SDL.
>>>>
>>>>It seems that any time I call ov_clear, the app goes unstable and 
>>>>crashes later in calls to glibc. This is unacceptable for obvious 
>>>>reasons and I was wondering if there was a way to fix it by just using 
>>>>libvorbis.
>>>>
>>>>I was going to experiment with the possibility, but I have, as yet, been 
>>>>unable to find any programming docs about libvorbis.
>>>>
>>>>So, here is the question. Would it be easier to use libvorbis? Or is it 
>>>>possible that the libvorbisfile library could be fixed?
>>>>
>>>>This is unrelated to my previous message about the SegFault in ov_clear.
>>>>
>>>>TIA
>>>>--Alex
>>>>
>>>>--- >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-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.
>>>
>>>
>>>--- >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-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.
>>
>>--- >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-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.
> 
> 
> 
> --- >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-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.

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