0
0

Hello,

I’m using FMOD 3.75 and I would like to play 2 mp3 files exactly at the same time, so i writted this code :

[code:2s3lbir1] stream = FSOUND_Stream_Open("file1.mp3", FSOUND_HW2D, 0, 0);
stream2 = FSOUND_Stream_Open("file2.mp3", FSOUND_HW2D, 0, 0);

if(stream == NULL || stream2 == NULL)
{
    cout << "Erreur lors du chargement du stream:\n" << FSOUND_GetError() << endl;
}

channel = FSOUND_Stream_Play(FSOUND_FREE, stream);
channel2 = FSOUND_Stream_Play(FSOUND_FREE, stream2);[/code:2s3lbir1]

And, generally when i launch the game, the sounds play at the same time BUT sometimes, when there is a little lag at the start my second sound play with a short delay and they are no more sync !
I would like to know how to be sure that the two sounds will be always synced (it’s a rythm game so .. :p)
I didn’t find an answer on the forum.

Thanks you for help ! and sorry for my low english level :p

  • You must to post comments
0
0

Try using FSOUND_2D instead of FSOUND_HW2D

Next use FSOUND_Stream_PlayEx and set ‘paused = true’.

Next do 2 setpaused(false) calls together.

If that does not work, your only alternative is to put the 2 setpaused calls into a dsp callback, using FSOUND_DSP_Create.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.