Open Geokureli opened 1 year ago
I know almost nothing about this, but I can at least track down some relevant lines numbers.
If audio_load_file()
returns null, then OGG::Decode()
returned false. This can happen in one of two ways. The first of those refers to VorbisFile
, which relies on ov_open_callbacks()
, which calls a bunch of different functions in the same file and errors if any of them fail. The second relies on ov_info()
, which can return null "in the case that the machine is not initialized." Pretty sure it's the first option, since that one depends heavily on the details of the ogg file.
Maybe it's fixable, but let's see if we can find a workaround. Try opening in Audacity and exporting as wav or mp3. Then open that file and export as ogg. This should force it to recreate the whole thing from scratch, hopefully no longer causing the bug.
If that doesn't work (or doesn't fit the user's workflow), it's also worth trying a newer version of the Ogg library by switching to 8.2.0-Dev. (This might require OpenFL 8.3.0-Dev, not sure.)
Try opening in Audacity and exporting as wav or mp3. Then open that file and export as ogg. This should force it to recreate the whole thing from scratch, hopefully no longer causing the bug.
this worked, @lol4meh https://github.com/lol4meh/flixelsoundtest/pull/1
Continued from: https://github.com/HaxeFlixel/flixel/discussions/2848
Project recreating the issue: https://github.com/lol4meh/flixelsoundtest
The issue is here: https://github.com/openfl/lime/blob/develop/src/lime/utils/Assets.hx#L122
symbol.library.getAsset(symbol.symbolName, type)
returns null even thoughsymbol.exists(type) && symbol.isLocal(type)
is true.in my case I used NativeCFFI.lime_audio_load_file, and it seemed specific to the .ogg file included in that project; this did not happen for other sound files I tried.
Seems like there should be a null check here, like so
But ultimately I wonder why this sound can't be loaded