Merge branch 'v0.21.x' into master

This commit is contained in:
Max Kellermann
2020-09-17 14:43:05 +02:00
6 changed files with 82 additions and 46 deletions
+12 -1
View File
@@ -443,7 +443,7 @@ Player::ActivateDecoder() noexcept
pc.audio_format.Clear();
{
/* call syncPlaylistWithQueue() in the main thread */
/* call playlist::SyncWithPlayer() in the main thread */
const ScopeUnlock unlock(pc.mutex);
pc.listener.OnPlayerSync();
}
@@ -684,6 +684,12 @@ Player::SeekDecoder(std::unique_lock<Mutex> &lock) noexcept
/* re-fill the buffer after seeking */
buffering = true;
{
/* call syncPlaylistWithQueue() in the main thread */
const ScopeUnlock unlock(pc.mutex);
pc.listener.OnPlayerSync();
}
return true;
}
@@ -1175,6 +1181,11 @@ try {
{
const ScopeUnlock unlock(mutex);
do_play(*this, dc, buffer);
/* give the main thread a chance to
queue another song, just in case
we've stopped playback
spuriously */
listener.OnPlayerSync();
}