0
0

Hello, I’m working in a program to mix audio files. I’m creatting a instance of FMOD with the following code:

FMOD_System_Create System
FMOD_System_SetOutput System, FMOD_OUTPUTTYPE_DSOUND
FMOD_System_SetSpeakerMode System, FMOD_SPEAKERMODE_7POINT1
FMOD_System_Init System, 4, FMOD_INIT_NONREALTIME, 0

… and everything goes OK. Then I have two forms (each form represents a channel of the mixer), and I load a song in each of them:

FMOD_Sound_Release Sound
FMOD_System_CreateStream System, FileName, (FMOD_SOFTWARE Or FMOD_2D), Sound

… again, there’s no problem. In each channel i have a button to select in wich set of speakers (front or rear) the audio will play:

Private Sub btnPlay_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)

FMOD_System_PlaySound System, FMOD_CHANNEL_FREE, Sound, 0, Channel
If OutputMode = 2 Then FMOD_Channel_SetSpeakerMix Channel, 0, 0, 0, 0, 1, 1, 0, 0 ‘monitor
If OutputMode = 1 Then FMOD_Channel_SetSpeakerMix Channel, 1, 1, 0, 0, 0, 0, 0, 0 ‘main

End Sub

… and at this point nothing’s wrong. THE PROBLEM is, that when I want to play one channel in rear and the other channel in front, both channels play in the four speakers. I tried creating ChannelGroups, but it’s the same. Then I tried creating two FMOD instances, but VB crashes when i attempt to do these. Also, i tried with the setSpeakerLevels function, but i’m getting the same result.

How can I play sound in different channels (as a monitor feature).?
There is an error in my code?

Please help me, i’m stuck and i don’t know what to do. Thanks.

P.D Sorry for my english :(

  • You must to post comments
0
0

No, i’m playing two diferent streams, of two diferent files. My windows settings are OK, but I’m getting the same problem. When i try to play both streams at the same time with diferent speakers, both files are audible trough the four speakers.

I tried with two instances of my compiled app, and it works, but i want to do it in the same program.

What do you think?

Please help me. :(

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.