0
0

At least, i think, this is the function, that makes my headache.
First the code :

The classfunctions :
[code:39o8iaxk]
bool FMOD_SOUND_WRAPPER::Init_Sound()
{
if (!FSOUND_Init(44100, 32,0)) return false;
FSOUND_SetDriver(0);
return true;
}

bool FMOD_SOUND_WRAPPER::Play_Music(char *music_file)
{
Music.Music_File = FSOUND_Stream_OpenFile(music_file, FSOUND_2D, 0);
if (Music.Music_File != NULL)
{
Music.channel = FSOUND_Stream_Play(FSOUND_FREE, Music.Music_File);
FSOUND_SetVolume(1, 200);
return true;
}
return false;
}
[/code:39o8iaxk]

And the calling function :

[code:39o8iaxk]

bool Init_and_Load_Sound()
{
if (Sound.Init_Sound())
{
Sound.Play_Music(“Data\Sound\Maintheme.wav”);
return true;
}
return false;
}
[/code:39o8iaxk]

The Problem is : On the Sound.Play_Music Funtion-Call, it crashes !
And the debugger just shows me that damn function. I have no idea, whats wrong with it… Probably i am just too dumb to find my mistake.

I am using FMod 3.62.

THX in advance for your help.

  • You must to post comments
0
0

This sounds like it should be a FAQ entry. What are ‘administered extensions’ anyway?

  • You must to post comments
0
0

I hope i translated it correctly because i am using a german edition of VS .NET. Dont ask me, what this option means, i just switched every option and suddenly it worked ๐Ÿ˜‰

  • You must to post comments
0
0

Does FMod 3.62 need Directx 9 SDK ?
I use Directx 8.1 SDK with DirectX 9 Runtime installed under Windows XP…
I even tried the following (short form of the above) :
[code:1h58r5a4]
FSOUND_STREAM *mus;
FSOUND_Init(44100,32,0);
mus = FSOUND_Stream_OpenFile("Data\Sound\Maintheme.wav", FSOUND_2D, 0);
[/code:1h58r5a4]

Gives me an error just on startup…

  • You must to post comments
0
0

FSOUND_SetDriver should be called before FSOUND_Init

  • You must to post comments
0
0

[code:3qqqblp5]
FSOUND_STREAM *mus;
FSOUND_SetDriver(0);
FSOUND_Init(44100,32,0);
mus = FSOUND_Stream_OpenFile("Data\Sound\Maintheme.wav", FSOUND_2D, 0);
[/code:3qqqblp5]

This is the code, right after a window initialization.

The wave File is ok. FMod is 3.62, i redownloaded it today.

Edit : I tried 2 other wav files and 1 mp3, all the same…

  • You must to post comments
0
0

No, it didnt (i edited the post above).

  • You must to post comments
0
0

FMod Media Player plays the file.

So the problem must be anywhere inside my code, but where… Shouldnt be too difficult to get 4 lines of code to work ๐Ÿ˜‰

  • You must to post comments
0
0

Didnt help :(

Could i probably mixed up the installation of fmod ? i manually copied fmod.dll, fmod.h, fmodvc.lib and libfmod.a in the directory…

Btw.: THX for your help !

  • You must to post comments
0
0

Didnt know, what libfmod.a was for… ๐Ÿ˜‰
i do not use it, i thought, one of your files would eventually need it…

  • You must to post comments
0
0

Argl a compiler setting.
I had to switch off “Use Administered Extensions” in VS .Net…

THX for your help !

  • You must to post comments
Showing 10 results
Your Answer

Please first to submit.