Sound just don't work


I started two days ago with openfl. Did some basic tutorials. Today I started working with sounds. Except they simply does not work.

OpenFl 4.2.0-LetoAe
Run as Debug, target neko.


<assets path="assets/audio" rename="audio" type="audio" />
<assets path="assets/sfx" rename="sfx" type="sound" />

Project of course has assets/audio and assets/sfx with some .mp3 and .ogg files.


var sound:Sound = Assets.getSound(“sfx/menu_over.mp3”);;

Program will simply exit unexpectedly at line with Only info in console is
AL lib: (EE) alc_cleanup: 1 device not closed

As I understand it, it is not related to problem, it is just cleanup message.

There are no stack traces or exceptions in console.


Yep, ogg worked. But why program ended without any warning, error or stacktrace? It makes very hard to solve issues.

You probably got a null result. This might fix it in the future:

var sound = Assets.getSound ("sfx/menu_over.mp3");

if (sound == null) {
    trace ("Could not load sound sfx/menu_over.mp3");
} else { ();

(it should not return null normally, but in this case, it was probably null since it could not decode the MP3 sound)