Changing the Pitch property on DynamicSoundEffectInstance has no effect

Changing the property on a SoundEffectInstance works though.

Maybe I missed something and this is working as intended. Or is that a bug ?

Without code we can’t tell you anything. It may be a bug or a problem with your implementation

Well, here it is then :

            DynamicSoundEffectInstance dsei = new DynamicSoundEffectInstance(48000, AudioChannels.Stereo);
            dsei.SubmitBuffer(AudioData, offset, AudioData.Length - offset);
            dsei.Pitch = 0.5f; // doesn't change the pitch as it should

But using this code instead, the pitch change works flawlessly :

            SoundEffect se = new SoundEffect(AudioData,48000, AudioChannels.Stereo);
            SoundEffectInstance sei = se.CreateInstance();
            sei.Pitch = 0.5f;
            sei.IsLooped = false;
1 Like

I think u need to create instance in your first code.

The instance is created just fine, in the first line of the code I posted. The audio plays all right, it’s just that the pitch isn’t modified.