I want to return my file pointer for my Ogg Vorbis file back to the start so that when I call ov_read it will return to me the beginning of the sound file.
How can I control the location of the file pointer?
How to return Ogg Vorbis file pointer to start?
Started by MarekKnows.com, Mar 29 2009 07:27 PM
4 replies to this topic
#1
Posted 29 March 2009 - 07:27 PM
C++, 3D OpenGL and Game Programming video tutorials:
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
#2
Posted 29 March 2009 - 07:47 PM
Read The Fine Manual :)
http://www.xiph.org/.../reference.html
Functions you seek is under Seeking section - ov_XXX_seek().
http://www.xiph.org/.../reference.html
Functions you seek is under Seeking section - ov_XXX_seek().
#3
Posted 29 March 2009 - 07:49 PM
my Ogg file is not seekable therefore I cannot use the seek functions.
Is there another way that I can "rewind" my file back to the start?
Is there another way that I can "rewind" my file back to the start?
C++, 3D OpenGL and Game Programming video tutorials:
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
#4
Posted 30 March 2009 - 12:00 AM
Only thing I could think of is closing and reopening it. Ogg has some internal states and if you mess with the file pointer you will likely break something. Being open source of course, you could go in their code and iron out a solution that would be faster.
http://www.nutty.ca - Being a nut has its advantages.
#5
Posted 30 March 2009 - 12:56 AM
That did the trick. Thanks TheNut.
If you'd like to try out my game, you can download it here:
http://www.marek-kno...topic.php?t=356
If you'd like to try out my game, you can download it here:
http://www.marek-kno...topic.php?t=356
C++, 3D OpenGL and Game Programming video tutorials:
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
www.MarekKnows.com
Play my free games: Ghost Toast, Zing
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












