The above fails if you remove the stream and change the .openFromStream(stream) to .openFromFile("hangs_forever.ogg").
I can't confirm this. It plays fine when I open it with sf::Music directly (using MinGW).
creating stream from ./hangs_forever.ogg
opening from stream
playing...
done playing ./hangs_forever.ogg
Quickly firing up the debugger and stepping through the SFML code, it seems like the OGG file is for some reason throwing off the FLAC decoder. The way SFML has implemented the audio format detection is that it would pass it to the various decoder libraries and let them judge whether it's a format they can read.
For some reason FLAC__stream_decoder_process_until_end_of_metadata never returns when you pass it your stream.
Currently I've something I need to take care of, so I can't further debug the issue, but I think it should be fairly easy to pick up where I left off and dig down where in your stream class starts to hang.
And/or what the FLAC decoder expects the stream to return.
Thanks for taking a look at this!
I can't confirm this. It plays fine when I open it with sf::Music directly (using MinGW).
Well its failing using sf::Music openFromFile (everything related to streams and anything else having to do with the file nixed right out) on the 32bit version of Visual Studio 2015, using the version downloaded from the SFML page in Windows 10, with the libs/includes/dlls all set up pretty standard, nothing fancy or custom.
Quickly firing up the debugger and stepping through the SFML code, it seems like the OGG file is for some reason throwing off the FLAC decoder.
Why would it throw off the FLAC decoder when my file is encoded via vorbis?
$ oggz codecs hangs_forever.ogg
> vorbis
The way SFML has implemented the audio format detection is that it would pass it to the various decoder libraries and let them judge whether it's a format they can read.
Is there an easy way I can override this and force it to use vorbis?