Here is the code I use:
CODE
int result;
if(!(oggFile = fopen(path.c_str(), "rb")))
throw string("Could not open Ogg file.");
if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
{
fclose(oggFile);
throw string("Could not open Ogg stream. ") + errorString(result);
}
if(!(oggFile = fopen(path.c_str(), "rb")))
throw string("Could not open Ogg file.");
if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
{
fclose(oggFile);
throw string("Could not open Ogg stream. ") + errorString(result);
}
Can somebody give me an idea?