Hissing sound when importing .wav

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Betelgeuse

Hello, Godot beginner here.

I’ve made a little synthy sound to be used in a game, but after importing it in the engine I can hear some kind of distortion like a faint hissing sound. I’ve tried listening to the original .wav file on a couple of audio players and the distortion is nowhere to be heard, but then I import the file in the engine and there it is.

It makes me think that I might be doing something wrong in the import settings, but I’ve tried playing a bit with them to no avail. Here’s some more info:

The .wav was exported at 16 bit 44100 Hz and the import settings match those
Engine version: 3.1.2.stable.official
OS: windows 10

Here I have attached a Godot project that contains only an AudioStreamPlayer with the sound. If you play “backgroundnoise.wav” with a separate audio player it sounds fine, but if you open the project and play the AudioStreamPlayer it sounds distorted.

Thanks for your time, please let me know if you need more information.

I use Linux and 3.2.stable.offical and i can’t hear a difference. It sounds perfect, even with my Beyerdynamic dt1990pro. Maybe you should also try 3.2?!?

DiMiMi | 2020-03-06 16:39

DiMiMi, this is a Windows-specific issue as pointed out by the answer below.

Calinou | 2020-03-10 13:04

:bust_in_silhouette: Reply From: Zylann

You might have the same issue as me: Bitrate-like artifact when playing low frequency sounds · Issue #23544 · godotengine/godot · GitHub

I’m on Windows too and I can hear a subtle high-frequency artifact in your sound, only when played in Godot.

Oh damn, that is the issue!

The sampling rate of my speakers and headphones in Windows is set to 48 kHz by default, and after changing it to 44.1 kHz the hissing is gone.

But surely there’s a way to fix this from inside Godot, after all I can’t expect whoever plays this game to change their audio sampling rate to match the one I used to make the music.

Either way, thank you, that was a very good find! I’ll see if the problem persists in Godot 3.2.

Betelgeuse | 2020-03-07 02:39

Does it sound better if you resample your sound to 48 kHz before importing it?

Calinou | 2020-03-07 12:30

Sorry for the wait,

I’ve done some tests. Exporting my sound at 48 kHz instead of 44.1 kHz unfortunately doesn’t seem to change anything, the artefact is still there.

I’ve also installed Godot 3.2 and tried again but no success there.

Here are two versions of the sound, sampled at 44.1k and 48k.

Betelgeuse | 2020-03-11 14:04