Hey Guys,
i currently working on a unity game project with integrated VoIP. I’ve allready managed to play the VoIP PCM stream ingame with FMOD and stick the channel which plays the sound to a gameobject. Now my problem is that the sound/channel is panned differently then other events in the scene. When the gameobjects Y and Z position is the same as the listeners one and only differs on the X axis i can only hear the the only on the left or right ear, depending if the gameobject is left or right of the listener. Some exmples:
Listeners position | Gameobjects position | result
(0, 0, 0) | (0, 0, 0) | sound on both ears with same volume
(0, 0, 0) | (-1, 0, 0) | sound only on left ear
(0, 0, 0) | (1, 0, 0) | sound only on right ear
(0, 0, 0) | (-1, 0.33, 0) | sound on left ear and very quietly on the right
(0, 0, 0) | (1, 0.33, 0) | sound on rightear and very quietly on the left
(0, 0, 0) | (-1, 0, 0.33) | sound on left ear and very quietly on the right
(0, 0, 0) | (1, 0, 0.33) | sound on rightear and very quietly on the left
That the way i created the sound:
_fmod = RuntimeManager.LowlevelSystem;
_pcmReadCallback = new SOUND_PCMREADCALLBACK(PCMReadCallback);
CREATESOUNDEXINFO exinfo = new CREATESOUNDEXINFO();
exinfo.cbsize = Marshal.SizeOf(exinfo);
exinfo.decodebuffersize = 8192;
exinfo.length = 8192;
exinfo.numchannels = 1;
exinfo.defaultfrequency = 44100;
exinfo.format = SOUND_FORMAT.PCM16;
exinfo.pcmreadcallback = _pcmReadCallback;
_fmod.createSound(string.Empty, MODE._3D | MODE.OPENUSER | MODE.LOOP_NORMAL | MODE.CREATESTREAM, ref exinfo, out _sound);
_fmod.getMasterChannelGroup(out ChannelGroup channelGroup);
_fmod.playSound(_sound, channelGroup, false, out _channel);
_channel.set3DMinMaxDistance(MinAttenuation, MaxAttenuation);
Is there any 3D setting which controlls how a sound/channel is panned that i missed? My goal is it that the VoIP is as nealy panned as any other sound ingame.
Thanks and greetings
Vell.