So far I've narrowed it down to
ov_test_callback which returns
OV_ENOTVORBIS (Bitstream contains no Vorbis data).
I'm not sure how one would now validate that the data from the stream is valid/invalid...
One difference I noticed is, that when calling
stream.tell() within the
SoundFileReaderOgg::check(InputStream& stream) function, it will report different values for sf::Music file and sf::FileInputStream.
(sf::Music)
size: 153776
tell: 0
size: 153776
tell: 4096
err: 0
(sf::FileInputStream)
size: 153776
tell: 8192
size: 153776
tell: 18432
err: -132
Modification:
bool SoundFileReaderOgg::check(InputStream& stream)
{
OggVorbis_File file;
sf::err() << "size: " << stream.getSize() << "\ntell: " << stream.tell() << "\n\n";
int check = ov_test_callbacks(&stream, &file, NULL, 0, callbacks);
sf::err() << "size: " << stream.getSize() << "\ntell: " << stream.tell() << "\nerr: " << check << "\n\n";
if (check == 0)
{
ov_clear(&file);
return true;
}
else
{
return false;
}
}
So to me it seems that ov_test_callbacks isn't reading from the start or similar...