0
0

I’m currently evaluating FMOD and am having trouble getting it to play 2 streams (of MP3 files) simultaneously.

As soon as I start playing one stream, the already existing stream stops playing.

Platform: HP iPAQ Pocket PC 2003

The application is a .NET compact framework version 1.0 application, using the wrapper functions shown in:

[url:cbbop3hl]http://www.fmod.org/forum/viewtopic.php?t=4874[/url:cbbop3hl]

The two streams are played using the following code:

[code:cbbop3hl]private void menuFilePlay_Click(object sender, System.EventArgs e)
{
// Declare our handles
IntPtr soundStream1;

// Initialize the handle with the track file. 
soundStream1 = FMOD.PPC.GetStream(@"\SD Card\My Music\Cafe Atlantico\Music.mp3"); 

// Open the stream in Normal mode, which is combination of Mono sound, 16 bits, Signed 
soundHandle1 = FMOD.PPC.Open(soundStream1, 0x100, 0, 0); 

// Start playing 
FMOD.PPC.Play(0, soundHandle1); 

}[/code:cbbop3hl]

And:

[code:cbbop3hl]private void menuFilePlay2_Click(object sender, System.EventArgs e)
{
// Declare our handles
IntPtr soundStream2;

// Initialize the handle with the track file. 
soundStream2 = FMOD.PPC.GetStream(@"\SD Card\My Music\Cafe Atlantico\01 Fior Di Nha Esperanca.mp3"); 

// Open the stream in Normal mode, which is combination of Mono sound, 16 bits, Signed 
soundHandle2 = FMOD.PPC.Open(soundStream2, 0x100, 0, 0); 

// Start playing 
FMOD.PPC.Play(0, soundHandle2); 

}[/code:cbbop3hl]

Noting that separate variables are used for the different streams and handles.

Setting the minimum number of hardware channels to 2 or 4 for example makes no difference.

Curiously, when I call FSOUND_GetNumHWChannels, the values of num2D, num3D, and total are all 0. FSOUND_GetMaxChannels returns 16, which was the value passed to FSOUND_Init.

Any clues?

Thanks
Ronny

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.