Jump to content


Ogg vorbis problem: ov_open(...)


1 reply to this topic

#1 kungfoomasta

    New Member

  • Members
  • Pip
  • 1 posts

Posted 06 July 2005 - 03:40 AM

Following the tutorial "OpenAL Lesson 8: OggVorbis Streaming Using The Source Queue" I get an error in the "open( string path )" function.

The portion of code where it fails is:
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);
}

More specifically, it's the ov_open function call. The program immediately halts when trying to execute the function, meaning the if is never even evaulated. The first line "fopen(...)" works, and I don't know what the problem could be. Here is my code, similar to the tutorials:

	if(!(oggFile = fopen("Track_12-New.ogg", "rb")))
	{
 std::cout << "hi";
	}

	result = ov_open( oggFile, &oggStream, NULL, 0);

I'm working in .NET 2003 7.1, and in debug mode when I execute the last line I get the error message:
"Unhandled exception at 0x7c918fea in MyGame.exe: 0xC0000005: Access violation writing location 0x00000010."

The cursor also jumps to the file "open.c" pointing to the following code:
__try {
      retval = _tsopen_lk( &unlock_flag,
                 &fh,
                 path,
                 oflag,
                 shflag,
                 pmode );
    }

Any help is appreciated, I'm sure it's a noob mistake on my part..

#2 mario++

    New Member

  • Members
  • Pip
  • 4 posts

Posted 07 July 2005 - 01:21 AM

:wink: Hi, I need more info about your problem.
was the fopen open the correct file?

Please send me more info.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users