Slight distortion when playing back sound effects

Hello everyone, like many people here I’ve been running my own little hobby game project, but lately I’ve run into the following issue: When playing back a high frequency sound effect (no XACT, just vanilla SoundEffectInstance.Play()) there seems to be some slight distortion happening which causes some unintended harmonics and subsequently makes the sound effect very unpleasant to listen to:


Top track is recorded from the game, bottom track is the source file

Things I’ve tried so far:

  • Fiddle with sample rate and bit depth of the source .wav file
  • Ensure only one sound effect instance is played at a time
  • Reduce peak levels of the source .wav file to leave plenty headroom and turn down master volume to something below 1 in case there’s something that’s causing accidental clipping

In all the above cases, the distortion still occurs. After doing a little spectrogram analysis on audio recorded from the game and the source files, it appears that this distortion seems to happen regardless of the source .wav format or contents, it’s just that high frequency sounds make the harmonics more audible. As far as I’m aware I’m not doing anything funky with the playback either, even when making an empty project that plays back the sound and nothing else the distortion still occurs.

Is there anything I’m missing here, maybe? Anything else I can do to mitigate the distortion without having to swap in an entirely different sound effect? Thanks in advance!

Have you tried adding a lead in time?

As in, slower attack, or appending a couple of ms of silence to the start? Either option still causes distortion on my end, unfortunately.

1 Like