SoundPlayer: Clear client buffer when playback is stopped

Previously we would not clear the client buffer of the
ConnectionToServer when playback was stopped. This would
cause old samples to be buffered and played when playback
was restarted.

With this commit we now perform this clearing of the client
buffer correctly.
This commit is contained in:
Joel Petersson 2023-05-02 22:35:05 +02:00 committed by Andreas Kling
parent 5563ebab5a
commit 23bc306f99
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00

View File

@ -37,6 +37,7 @@ void PlaybackManager::set_loader(NonnullRefPtr<Audio::Loader>&& loader)
void PlaybackManager::stop()
{
set_paused(true);
m_connection->clear_client_buffer();
m_connection->async_clear_buffer();
if (m_loader)