0
0

Hi,

I’m new to fmod and ran into the first problem.

I have an mp3 track playing on one channel. I start it like this:
m_MusicChannel = FSOUND_PlaySound(FSOUND_FREE, m_Samples[0]);
Now I want to play some sound effects on other channels, like this:
FSOUND_PlaySound(FSOUND_FREE, m_Samples[id]);
But as soon as the sound is played, the music stops.

If I play the sounds on specific channels like this:
m_MusicChannel = FSOUND_PlaySound(0, m_Samples[0]);
FSOUND_PlaySound(1, m_Samples[id]);
Everything works fine…

Can anyone please help me?

thx,
fallen

  • You must to post comments
0
0

Mhhh i don’t see something wrong, try with the last fmod dll [url=http://www.fmod.org/files/fmod.dll:17zdidu9]here[/url:17zdidu9].

  • You must to post comments
0
0

Thx, but that didn’t help…
I initialize fmod like this:
[code:u3xemttn]
FSOUND_Init(48000, 64, 0);
[/code:u3xemttn]
Do I also have to set the driver or something like that?

  • You must to post comments
0
0

I’ve just tested it on my notebook and there the error occurs, too. So I think it’s not a driver problem.

Here is my complete source:

[code:3ja3x79m]
int main()
{
if (FSOUND_GetVersion() < FMOD_VERSION)
return 0;

if (!FSOUND_Init(48000, 64, 0))
    return 0;

FSOUND_SAMPLE *music, *sound;
music = FSOUND_Sample_Load(FSOUND_FREE, &quot;b.mp3&quot;, FSOUND_NORMAL, 0, 0);
sound = FSOUND_Sample_Load(FSOUND_FREE, &quot;pings.mp3&quot;, FSOUND_NORMAL, 0, 0);

int musicchannel = FSOUND_PlaySound(FSOUND_FREE, music);

while(1)
{
    if (GetAsyncKeyState(VK_ESCAPE))
        break;
    if (GetAsyncKeyState(VK_RETURN))
        FSOUND_PlaySound(FSOUND_FREE, sound);

    if (!FSOUND_IsPlaying(musicchannel))
        musicchannel = FSOUND_PlaySound(FSOUND_FREE, music);
}

FSOUND_Sample_Free(music);
FSOUND_Sample_Free(sound);
FSOUND_Close();

return 0;

}
[/code:3ja3x79m]

Any ideas, what’s going wrong?

  • You must to post comments
0
0

Oh, you’re right… Shame on me…
Thanks alot!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.