Skip to content

Commit a4af04f

Browse files
Copilotriccardobl
andcommitted
Fix crash when pausing audio: handle Paused+AL_STOPPED state mismatch
Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
1 parent 6b74195 commit a4af04f

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)