1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

BufferStream: Add a function to fully reset state

This will allow us to reuse the same buffer with the same stream instance.
Needed in AudioServer.
This commit is contained in:
Robin Burchell 2019-07-16 09:32:21 +02:00 committed by Andreas Kling
parent 2c929c3aa1
commit 6e90f00925

View file

@ -187,6 +187,12 @@ public:
m_buffer.trim(m_offset);
}
void reset()
{
m_offset = 0;
m_read_failure = false;
}
bool handle_read_failure() {
bool old = m_read_failure;
m_read_failure = false;