mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
SoundPlayer: Don't crash when the reported buffer is unexpected
It seems like this happens in quite some valid situations, so my initially sensible failsafe doesn't make sense. As the buffer system is hopefully gone soon, it won't be an issue in the future either way.
This commit is contained in:
parent
9cca9f5204
commit
faf7331999
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,9 @@ PlaybackManager::PlaybackManager(NonnullRefPtr<Audio::ConnectionFromClient> conn
|
|||
m_connection->on_finish_playing_buffer = [this](auto finished_buffer) {
|
||||
auto last_buffer_in_queue = m_enqueued_buffers.dequeue();
|
||||
// A fail here would mean that the server skipped one of our buffers, which is BAD.
|
||||
VERIFY(last_buffer_in_queue == finished_buffer);
|
||||
if (last_buffer_in_queue != finished_buffer)
|
||||
dbgln("Never heard back about buffer {}, what happened?", last_buffer_in_queue);
|
||||
|
||||
next_buffer();
|
||||
};
|
||||
m_timer->stop();
|
||||
|
|
Loading…
Add table
Reference in a new issue