Hi,
want to setPitch for eventInstance to speed up my audio and want to use FMOD PITCHSHIFT to
reduce the tones.
l use pitch shift like this
ChannelGroup channel = new ChannelGroup();
if (!RuntimeManager.GetMasterChannelGroup(out channel))
{
UnityEngine.Debug.LogWarning("Get Channelgroup failed!");
return;
}
res = RuntimeManager.CoreSystem.createDSPByType(DSP_TYPE.PITCHSHIFT, out dsp);
if (res != RESULT.OK)
{
UnityEngine.Debug.LogError("Create DSP for sound failed!" + res);
return;
}
res = channel.addDSP(CHANNELCONTROL_DSP_INDEX.HEAD, dsp);
res = dsp.setParameterFloat((int)FMOD.DSP_PITCHSHIFT.PITCH, 0.5f);
if (res != RESULT.OK)
{
UnityEngine.Debug.LogError("DSP SetParameterFloat failed! " + res);
return;
}
but the audio sounds strange, just like the tone is very low.
I wonder what is the right way to add a dsp pitchshifter for EventInstance.
Thanks!