[vorbis-dev] Implementing looping audio

Michael Smith msmith at labyrinth.net.au
Fri Nov 23 17:56:48 PST 2001



>
>Seems straightforward enough, but I was wondering if there was a
>standard way of doing this before I go off and write something only to
>find out I did it the stupid way =)
>

This is straightforward, sensible, and should work fine. I thought I'd
suggest an alternative though - you pick which you prefer.

The idea is this: you have 3 vorbis streams (in a single file. Creating
this can be as easy as "cat intro.ogg main.ogg outro.ogg > full.ogg").

Then, you just play through - when you hit EOS (end of stream, _not_ end
of file), you can then make a decision - either loop back to the start
(normally), or continue on (when you want to go from intro->main, or 
main->outro). 

In some ways this is more complex, but in other ways it's a more natural
fit to your problem. There's no substantial advantage either way.

Michael

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