Audio context changed and sounds different after importing to Unity

Hi,

Three days ago I post a thread to ask why my audio sounds different when loading it dynamically, see here:
http://forum.unity3d.com/threads/noisy-when-playing-single-frequency-pcm-audio.354231/

Now I narrow down my problem and I am confident that my audio file is changed after simply importing it into a Unity resource file.

If you want to see how it happens, just download the attachment file and drag it into Unity, then listen it in Unity and in Windows media player separately.

The figure below shows how I play it in unity.

It is an high frequency PCM sound and you may hear nothing or slightly buzzing when using Windows media player but loud noise with Unity.

And I want to know how to fix this problem or disable these feature.

Thanks so much!

2293736–154308–temp.rar (14.6 KB)

Maybe it’s the compression that is messing it up? Try uncompressed.

Thanks for your reply.
I have tried changing compression format into PCM but it still sounds differently. Or could you tell me how to make it “uncompressed”, I am new to Unity audio programming. :slight_smile:

Do you have 3D sound off on the file?

How does it sound different?

I just tried it, with Native (Wav) it sounded the same (at least from what I could from the crappy speakers I have here), while I could hardly hear anything with compression (I guess phases cancel each other out).

Yes, I made 3D sound off.

To reproduce my problem you can follow the steps below:

  1. Drag the attached wav file into Unity 5.2
  2. Play it by press the play button in Inspector and listen to it. (You can hear an meaningless and annoying loud noise)
  3. Play it with Windows Media Player or other music player and listen to it. (You may hear nothing or slightly buzzing because the raw data is just an high frequency PCM sound. The frequencies in this wav file are above 17Khz which human ears are not sensitive to it)
  4. Step2 and 3 sounded very different.

I have tried many wave files, play them with unity, record the sound in Adobe Audition and make a comparison with my original file. And I am sure unity is not playing the raw data. So that it sounded different in Unity and WMP.

Since you told me it sounded the same, I asked my colleagues to reproduce my problem and they got the same result: they sounded totally different. And then I’ve tried Unity 4.6 5.1 and 5.2 both Free License and Pro License, problem still exists.

If not because of compression, it may be an interpolation related artifact since Unity may be running on a different sample rate than the sound itself. Either way, the frequency range of different people vary, and I can hear up to near 20Khz. That sound would have been insanely hurtful to my ears if I didn’t figure out what it was and turned the volume down first. Loud high frequencies can be damaging to the hearing, and I think you should have put a large warning text in your first post, as well as set it to a much quieter volume to make listeners turn up the volume if needed, rather than down.

1 Like