0
0

Hey everyone, I’m relatively new to FMOD (only used it a couple times). So after a bit of a break I decided to use it again. I couldn’t find the documentation on the website, so I decided to post here :)

I basically am loading an mp3 from an absolute(?) path [something like C:\WINDOWS\blah.mp3] however my program is crashing…

[code:n7uwcx1a]
if(!FSOUND_Init(44100,32,0))
{
out << "FMOD Initialisation failed, reason: " << endl;
}

            // load the file
            handle = FSOUND_Sample_Load(FSOUND_FREE, go.getFile(id),FSOUND_NORMAL, 0, 0);
            if(handle != NULL)
            {
                FSOUND_PlaySound(FSOUND_FREE,handle);
            }

            else
            {
                out &lt;&lt; &quot;Unable to load audio sample, reason: &quot; &lt;&lt; endl;
                    }

[/code:n7uwcx1a]

i’m using go.getfile(id) to get the name of the path of the file (and the name)

am i doing anything wrong?

also when the user hits s on the keyboard then the following code is executed:

[code:n7uwcx1a]
FSOUND_StopSound(0);
FSOUND_Sample_Free(handle);
FSOUND_Close();
[/code:n7uwcx1a]

  • You must to post comments
0
0

no i haven’t checked that, i wasn’t sure if my code was correct or not (i thought maybe there was a code for an exact path and that was why it was crashing)

i’ll run it through the debugger when i get home, sorry to bother :/

EDIT: ran it through the debugger (still not great with it), anyway not sure if this is a FMOD issue or some issue in my programming, but i got

Unhandled exception at 0x7c9012b4: 0xc0000005: Access violation reading location 0xfdfdfdfd.

I’m gonna work on it somemore and see what i can do

EDIT 2: Pretty sure a problem on my end… I’m gonna try to fix it… sorry!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.