Skip to content

Commit 80015d1

Browse files
Copilotriccardobl
andauthored
Fix AssertionError crash when audio source finishes while paused (#2633)
* Initial plan * Fix crash when pausing audio: handle Paused+AL_STOPPED state mismatch Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
1 parent d438369 commit 80015d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ public void updateInRenderThread(float tpf) {
11471147

11481148
// Check if we need to sync JME status with OpenAL status.
11491149
if (openALStatus != jmeStatus) {
1150-
if (openALStatus == Status.Stopped && jmeStatus == Status.Playing) {
1150+
if (openALStatus == Status.Stopped && jmeStatus != Status.Stopped) {
11511151

11521152
// Source stopped playing unexpectedly (finished or starved)
11531153
if (src.getAudioData() instanceof AudioStream) {

0 commit comments

Comments
 (0)