summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorJoel Petersson <joel.anders.petersson@gmail.com>2023-05-02 22:35:05 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-03 10:01:14 +0200
commit23bc306f9918e5852c9a736cd5820e033dff2f13 (patch)
tree5e742bdc47db34d45c34ebc83a57ebd8583cd545 /Userland
parent5563ebab5a4e7d41dccda23e536819eca7b4bb0b (diff)
downloadserenity-23bc306f9918e5852c9a736cd5820e033dff2f13.zip
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.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/SoundPlayer/PlaybackManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Applications/SoundPlayer/PlaybackManager.cpp b/Userland/Applications/SoundPlayer/PlaybackManager.cpp
index 3f0f81182b..d192fdb19c 100644
--- a/Userland/Applications/SoundPlayer/PlaybackManager.cpp
+++ b/Userland/Applications/SoundPlayer/PlaybackManager.cpp
@@ -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)