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:
kleines Filmröllchen 2022-03-25 20:23:35 +01:00 committed by Brian Gianforcaro
parent 9cca9f5204
commit faf7331999

View file

@ -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();