OGG Streaming

Monkey Targets Forums/Desktop/OGG Streaming

Soap(Posted 2015) [#1]
'GLFW supports WAV/OGG - OGG doesn't stream yet.

>glfw - added stb_vorbis loader (doesn't stream yet) and loadSound/unloadSound functions

OGG still not streaming on glfw? This would be nice to add so game does not hang while loading different music tracks.


Soap(Posted 2015) [#2]
Might be worth updating the version

// Ogg Vorbis audio decoder - v1.04 - public domain
https://github.com/nothings/stb/blob/master/stb_vorbis.c


// Ogg Vorbis I audio decoder -- version 0.99996
MonkeyXPro82a\targets\glfw\template\stb\stb_vorbis.c

// This API assumes stb_vorbis is allowed to pull data from a source--
// either a block of memory containing the _entire_ vorbis stream, or a
// FILE * that you or it create, or possibly some other reading mechanism
// if you go modify the source to replace the FILE * case with some kind
// of callback to your code. (But if you don't support seeking, you may
// just want to go ahead and use pushdata.)
// create an ogg vorbis decoder from an ogg vorbis stream in memory (note
// this must be the entire stream!). on failure, returns NULL and sets *error

Looks like by default this does not support "streaming from disk" and instead requires loading everything into memory at once? That is fine, but the problem of causing the game to hang while loading the new track fully into memory must be solved.

The problem may also be solvable in oggloader.cpp?

Any ideas? I'll investigate on my own too.