-
Notifications
You must be signed in to change notification settings - Fork 502
Music doesn't resume after onFocus in FlxSoundFrontEnd #3580
Description
Haxe version: 4.3.7
Flixel version: 6.2.0 (dev)
OpenFL version: 9.5.1
Lime version: 8.3.1
Affected targets: Windows (and other platforms)
Observed behavior:
When using FlxG.sound.music together with FlxG.sound.list of sounds:
If game loses focus, FlxG.sound.onFocusLost() correctly pauses all sounds
When focus is regained (onFocus()), sounds in list resume, but music doesn't
It seems that music is handled separately from list but shares most of the same lifecycle methods. This can lead to inconsistent behavior:
music may not resume after pausing
music may be destroyed unexpectedly when list is cleaned up
music and list logic is duplicated in multiple places (pause(), resume(), onFocusLost(), onFocus())
Expected behavior:
FlxG.sound.music should behave consistently with sounds in list resume() after onFocus() should resume music as well as other sounds