0
0

[code:31j8gaw7]

include "fmod.h"

include "iostream"

using namespace std;

int main()

{

FSOUND_Init(44100, 32, 0);

FMUSIC_MODULE* handle = FMUSIC_LoadSong("shinobi.mid");

if ( handle == 0 )

    {

    cout << "Bad file.";

    return -1;

    }

int success = FMUSIC_PlaySong(handle);

return 0;

}
[/code:31j8gaw7]

The program throws a tantrum right as soon as I ask it to do “FSOUND_Init(44100, 3, 0);”. I get that Windows error dialog that says something like “This program has performed an illegal operation and will be shut down”. When I view the details of the problem I’m given the following info:

TEST caused an invalid page fault in
module KERNEL32.DLL at 01b7:bff87ede.
Registers:
EAX=c00309c4 CS=01b7 EIP=bff87ede EFLGS=00010216
EBX=0066fe28 SS=01bf ESP=0056ffb8 EBP=00570024
ECX=66666664 DS=01bf ESI=cccccccc FS=6b37
EDX=bff76855 ES=01bf EDI=0042f5d0 GS=0000
Bytes at CS:EIP:
53 56 57 8b 30 83 7d 10 01 8b 4e 38 89 4d f8 75
Stack dump:

can anyone help?

thanks!

  • You must to post comments
0
0

Increase the allocated voices.
Btw, you example will not play the song, you have to add a loop after the play function.

  • You must to post comments
0
0

[code:37bz5ubw]

include "fmod.h"

include <iostream>

using namespace std;

int main()

{

FSOUND_Init(44100, 32, 0);

return 0;

}[/code:37bz5ubw]

if I reduce the code to this, then I’m given the following message

The TEST.EXE (name of my program) file is linked to missing report FMOD.DLL:GetVersion.

I have put fmod.dll into the same directory as my executable.

edit: what example? i’ve looked at the docs i think i may have missewd something 😳

  • You must to post comments
0
0

fmodapi373win\samples

Try any one of those samples.

  • You must to post comments
0
0

hi people

the samples do indeed compile perfectly.

but i’m trying to work from the bottom up. its a little difficult deciphering the samples (i’m an experianced java programmer and have had brief exposure to C++, i’m currently teaching it to myself).

why does the second snippet of code I posted fail to work?

  • You must to post comments
0
0

hi brett

i’m using visual c++ 6.0.

its a bit old, i guess but i didn’t think the age would matter. does it?

i have linked fmodlcc.lib and fmodvc.lib.

  • You must to post comments
0
0

You only need fmodvc.lib. fmodlcc.lib is for the LCC compiler.

  • You must to post comments
0
0

[quote="Sly":odaaxquz]You only need fmodvc.lib. fmodlcc.lib is for the LCC compiler.[/quote:odaaxquz]

thank you!

it works now!

thanks ever so much people, i’ve got a big project on my hands and i was beginning to think i bit off more than i can chew. that still probably is the case but at least now i can start mucking around with the API. 😀

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.