0
0

OK, here’s my code:
[code]
short InitFMOD()
{
if (FSOUND_GetVersion() < FMOD_VERSION)
{
MessageBox(NULL, “Error Loading FMOD”, “Error initializing Sound”, MB_OK);
exit(1);
}

return 0;

}

short QuitFMOD()
{
FMUSIC_FreeSong(mod);
FSOUND_Sample_Free(samp3);
FSOUND_Close();
return 0;
}

short PlayFMODSong(char* name)
{

FSOUND_SetOutput(FSOUND_OUTPUT_WINMM);

FSOUND_SetDriver(0);


FSOUND_SetVolume(FSOUND_ALL, 255);
if (!FSOUND_Init(44100, 32, FSOUND_INIT_USEDEFAULTMIDISYNTH ))
    return 1;

mod = FMUSIC_LoadSong(name);
if (!mod)
    return 1;

FMUSIC_PlaySong(mod);

return 0;

}

short PlayFMODSound(char* name)
{

FSOUND_SetOutput(FSOUND_OUTPUT_WINMM);

FSOUND_SetDriver(0);


FSOUND_SetVolume(FSOUND_ALL, 255);
    if (!FSOUND_Init(44100, 32, FSOUND_INIT_GLOBALFOCUS))
    return 1;
samp3 = FSOUND_Sample_Load(FSOUND_FREE, name, FSOUND_2D, 0);
if (!samp3)
{
    printf("samp3: %sn", FMOD_ErrorString(FSOUND_GetError()));
    return 1;
}
FSOUND_PlaySoundEx(FSOUND_FREE, samp3, NULL, FALSE);

return 0;

}[code]

InitFMOD is called at the beginning of the programming shortly before my window is created, then PlayFMODSong is called and plays perfectly until PlayFMODSound is called. Then the song stops and the sound is played. Why? How can I make them play simultainliously on different channels???

  • You must to post comments
0
0

I seem to recall something about needing to use DSOUND to mix. WINMM doesn’t mix or soemthing like that.

I know when I ran 98 I couldn’t listen to Mp3’s and play games at the same time, on XP I can.

I’m not sure this is your problem, but I’m sure I read that somewhere.

Help this helps…

  • You must to post comments
0
0

Oh thanks brett (god). It’s the first time I’ve ever worked with sound and fmod so I made such a stupid mistake. Thanks again.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.