mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
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:
parent
5563ebab5a
commit
23bc306f99
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/Alphapork Commit: https://github.com/SerenityOS/serenity/commit/23bc306f99 Pull-request: https://github.com/SerenityOS/serenity/pull/18613
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user