DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Sound and Music Programming
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-05-2005, 09:40 PM   #1
kungfoomasta
New Member
 
Join Date: Jul 2005
Posts: 1
Default

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:
Code:
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:

Code:
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:
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..
kungfoomasta is offline   Reply With Quote
Old 07-06-2005, 07:21 PM   #2
mario++
New Member
 
Join Date: Jun 2004
Posts: 4
Default

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

Please send me more info.
mario++ is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 01:36 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.