WebContent: Clear Serenity's audio buffers when seeking

Without this, the already-buffered audio may continue playing after a
seek. The SoundPlayer application does the same operation here.
This commit is contained in:
Timothy Flynn 2023-07-03 09:42:30 -04:00 committed by Andreas Kling
parent 21260ea2ef
commit 27ca90646d
Notes: sideshowbarker 2024-07-17 04:01:41 +09:00

View file

@ -92,6 +92,9 @@ void AudioCodecPluginSerenity::seek(double position)
{
m_position = set_loader_position(m_loader, position, m_duration);
m_connection->clear_client_buffer();
m_connection->async_clear_buffer();
if (on_playback_position_updated)
on_playback_position_updated(m_position);
}