What is the difference between ChannelControl::setPan
and FMOD_DSP_PAN_2D_STEREO_POSITION
?
I tested them myself:
FMOD_System_PlaySound(g_System, g_Sound, NULL, TRUE, &channelA);
FMOD_System_PlaySound(g_System, g_Sound, NULL, TRUE, &channelB);
FMOD_Channel_SetPan(channelA, -0.5f);
FMOD_DSP* panDSP;
FMOD_System_CreateDSPByType(g_System, FMOD_DSP_TYPE_PAN, &panDSP);
FMOD_DSP_SetParameterInt(panDSP, FMOD_DSP_PAN_MODE, FMOD_DSP_PAN_MODE_STEREO);
FMOD_DSP_SetParameterFloat(panDSP, FMOD_DSP_PAN_2D_STEREO_POSITION, -50.0f);
FMOD_Channel_AddDSP(channelB, FMOD_CHANNELCONTROL_DSP_TAIL, panDSP);
// This is called to match the volume levels.
FMOD_Channel_SetVolume(channelB, 0.7f);
FMOD_Channel_SetPaused(channelA, FALSE);
FMOD_Channel_SetPaused(channelB, FALSE);
FMOD_Channel_SetMute(channelB, TRUE);
The reason why I lowered the volume of the second channel is it was much louder when FMOD_DSP_TYPE_PAN
and FMOD_DSP_PAN_2D_STEREO_POSITION
are applied.
I compared two channels switching between them, and I didn’t like the sound from the channel with FMOD_DSP_TYPE_PAN
.
I don’t know how to describe it, but the first one felt more smooth and natural.
On the other hand, the sound via FMOD_DSP_PAN_2D_STEREO_POSITION
doesn’t seem to be distributed to the left and right speakers smoothly as the first one.
- Why is this? Why the first one is quieter but more natural compared to the second one?
- Which one is better performance-wise?
(In the case where the pan setting is very frequently adjusted, and in another case where the different pan settings are applied to a lot of sound sources.)