Platform: Windows v3.2.1 stable-official
Steps to reproduce: I simply imported an audio sample with total size <0,15s, set it to not loop, force 8-bit. Whenever AudioStreamPlayer.play() was called it would loop indefinitely, even after calling stop().
Can you provide a minimal project that can reproduce the issue?
@akien-mga
Can you provide a minimal project that can reproduce the issue?
For sure my man.
gd_sound_test.zip
Steps I took in order to reproduce:
4359__noisecollector__pongblipf4.wav file into res://play() on _ready()Thanks.
I checked the project and it turns out that it's not a bug: WAV files have metadata to hardcore loop points, and 4359__noisecollector__pongblipf4.wav has such a loop point defined. You can check it with LoopAuditioneer:

Godot's WAV importer respects this metadata and will thus set loop information for the WAV file on import as encoded in the file.
The edit/loop import option is actually not a toggle to disable the use of this metadata, but instead it's used to force a WAV file without loop points to be imported with loop.
You can see that your AudioStreamSample is imported with non-default values for Loop Mode and Loop End, taken from the WAV loop points metadata:

As the screenshot shows it, changes made here will not be kept as it's an imported resource, but you can save it as a custom .tres resource:

And then you can change the values and use this new resource as your stream in AudioStreamPlayer. Alternatively, you can remove the hardcoded loop point from the WAV file.
Thanks a lot man. I read the following in the docs:
Keep in mind Ogg Vorbis files don鈥檛 contain looping information. If looping an Ogg Vorbis file is desired, it must be set up using the import options
And for some reason I inferred that it also applied to WAV files. My mistake lol.
Thank you again for your time and have a great day 馃槃
I'll add something about WAV files holding looping metadata which Godot honours, as it's not obvious.
I created a draft PR here.
Most helpful comment
I'll add something about WAV files holding looping metadata which Godot honours, as it's not obvious.