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
Notes: sideshowbarker 2024-07-19 13:15:13 +09:00

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;