QUOTE (Rockin' Pete @ Jul 25 2008, 13:08)

What's the fastest way to go back to the beginning of a non-seekable Ogg/Vorbis stream?
I'd prefer not to have to reopen it because that can easily take 50ms on the slow mobile platform that starts with "i" that I'm working on. It can easily take a second to open an Ogg/Vorbis file as seekable, so we're opening all of our files as non-seekable. But we still need to loop them, and some of them are music files - a bit too big to decompress into memory.
Can't you just cache the first few KBs of the stream when you first open it ? Then use that to decode from whilst the file is being re-opened in the background or something ? If you only need to cover 50ms or so then you'll need a tiny amount of memory to cache the start.. Even with a stream at 128Kb/s that's still only 16KB a second so 4K would cover you for easily a quarter of a second.. I don't know how much gumpf sits at the start of Ogg streams, but I can't imagine it's too much..