AL: fix crash when device is disconnected
This commit is contained in:
parent
44e568943b
commit
78b635726a
@ -904,11 +904,12 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
|
|||||||
} else {
|
} else {
|
||||||
// Buffer finished playing.
|
// Buffer finished playing.
|
||||||
if (src.isLooping()) {
|
if (src.isLooping()) {
|
||||||
throw new AssertionError("Unexpected state: " +
|
// When a device is disconnected, all sources
|
||||||
"A looping sound has stopped playing");
|
// will enter the "stopped" state.
|
||||||
} else {
|
logger.warning("A looping sound has stopped playing");
|
||||||
reclaimChannel = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reclaimChannel = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reclaimChannel) {
|
if (reclaimChannel) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user