Synchronize on activeAudioPlayers when changing them

master
jvoisin 5 years ago committed by GitHub
parent e7bd5da6fa
commit 8ba97026a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/service/JukeboxJavaService.java

@ -255,6 +255,7 @@ public class JukeboxJavaService {
return airsonicPlayer.getPlayQueue().getIndex();
}
});
synchronized (activeAudioPlayers) {
// Close any other player using the same mixer.
String mixer = airsonicPlayer.getJavaJukeboxMixer();
if (StringUtils.isBlank(mixer)) {
@ -266,6 +267,7 @@ public class JukeboxJavaService {
player.close();
}
});
}
audioPlayer.play();
}
}

Loading…
Cancel
Save