Jump to content
  • Advertisement
Sign in to follow this  

Error load file with FMOD... "sometimes"

This topic is 2993 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Might be the wrong section but considering my app is mainly DX...

Anyway, the thing is, Im trying to play a sound file using FMOD.
If I run my application over Debug > Start new instance (VS 2010) then I the sound file is played.
But if I run my applicaiton from the compiled .exe. It wont play...

Ive tried using the full path name, that doesnt work either.

Meaning that the pathing is wrong somehow, but then again not?
Where is the differnce in running my app over the debug instance or normal?

Anyone know why this is happening?

[Edited by - Tingle on July 14, 2010 6:30:48 PM]

Share this post

Link to post
Share on other sites
Well... you need to narrow it down a tiny bit.
What part doesn't work. Does FMod actually not play the file? or does it not find the file?
launching inside VS, VS gives your app a different working directory than if you launch it from the .exe through windows explorer, so that can explain it not finding the file.

The other, slim chance is that sometimes buffer-overrun type bugs will only show up when the debugger isn't attached. If fmod did find the file, but it isn't playing, you can launch VS and "attach to process" your debugger to find out what is different.

Share this post

Link to post
Share on other sites
well if I run the file normaly (where the sound is not playing), fmod returns the error, "FMOD_ERR_FILE_NOTFOUND" but if I run it with the debug->start new instance. then it does run and returns 0 = FMOD_OK.

And ill say it again: if running my app through VS, it DOES find the file.


okay, fixed it. FMOD "streams" files, meaning it opens the file and keeps it open. The problem is that the path to the file also needs to stay open, by making my path variable into a static one fixed my problem. It seems that runningi t on VS automaticly keeps single variables created inside functions alive somehow, but running the .exe by itsself doesnt support that.

[Edited by - Tingle on July 14, 2010 7:03:19 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!