Godot: Cannot import stereo sound

Created on 31 Mar 2016  路  15Comments  路  Source: godotengine/godot

Windows 7 64 bits, Godot 2.0.1

I am trying to add a stereo looping sound FX in my game, which I can play already (it was auto-imported), but cannot loop.
After some research I found out it needs to be re-imported so I can check the "loop" option.
So I re-imported the sound: in the dialog, I didn't ticked "mono" because I want it to be stereo, then Ok.
Import dialog
This created another file .smp, however it is mono...
File browser
Side note: shouldn't the 'loop' property better be a parameter of the sample player?

bug editor

Most helpful comment

the imported sound should be stereo, but it displays as mono because we never wrote code to show it as stereo

All 15 comments

for side not : I think the loop check in import is to edit the file so it will loop seamlessly.

It already loops, it was specifically done in an audio editing program. I don't see why Godot needs to modify it (I never heard of "blanks" inserted by DAWs as the doc says).

Well if it already loops perfectly, don't check the loop option when importing the sample :)

But if I don't, how do I make the sound loop?

Actually I've checked and the loop checkbox does not edit the sound, it will just import the sample with a predefined forward loop from position 0 to sample_length.

You can also define it after the import (regardless of whether loop was ticked) in the sample editor when you click the edit button in the sample library.

But if I don't use the import dialog, I can play the sound, preview it looping, but not make it loop in the game. Is it really required to import all sounds to .smp for this to work? (I thought it would create a .flags file like textures?).

Sound looping in Godot is confusing right now. I was writing about the problem:
https://github.com/godotengine/godot/issues/3872

@Zylann your imported sound is mono because you use RAM (lma-ADPCM) compression. Just set it to disabled and your sound will be fine. Also use 16-bit resolution samples with 44100 sample rate. Otherwise your sound will be distorted. Godot does not convert sounds very well right now, but audio system is going to be rewritten soon and should work much better.

the imported sound should be stereo, but it displays as mono because we never wrote code to show it as stereo

I tried to import a stereo sound again, and it became imported with a broken mono waveform (a frankly offset waveform causing a click). I thought it was just visual, but when I played the .smp it was actually broken, with a glitch caused by the offset. That's not just a visual issue.
I disabled the compression and the sound was imported AND drawn correctly in stereo.
BUT...
I cannot re-import it anymore at this point, the option is just not there Oo (and it's a bit annoying to go back and show you how the broken sound looked like).

I cannot re-import it anymore at this point, the option is just not there Oo (and it's a bit annoying to go back and show you how the broken sound looked like).

I not found an issue about this re-import bug(?) so I will comment here for now.
It happens sometimes after a re-import, the re-import option disappears from context-menu for no apparent reason.

Removing .smp file and importing again solves it (until it happens again).

That re-import problem should be a separate issue I think, I had the same recently in 2.1.1

I think so. I'll create one.

Re-import problem here: #7256

This ancient issue is from the old audio system, which was replaced in 3.0 AFAIK. I bet it's fixed long ago.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducdetronquito picture ducdetronquito  路  3Comments

rgrams picture rgrams  路  3Comments

gonzo191 picture gonzo191  路  3Comments

SleepProgger picture SleepProgger  路  3Comments

timoschwarzer picture timoschwarzer  路  3Comments