mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
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:
parent
21260ea2ef
commit
27ca90646d
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue