mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +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:
parent
2c929c3aa1
commit
6e90f00925
1 changed files with 6 additions and 0 deletions
|
@ -187,6 +187,12 @@ public:
|
||||||
m_buffer.trim(m_offset);
|
m_buffer.trim(m_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void reset()
|
||||||
|
{
|
||||||
|
m_offset = 0;
|
||||||
|
m_read_failure = false;
|
||||||
|
}
|
||||||
|
|
||||||
bool handle_read_failure() {
|
bool handle_read_failure() {
|
||||||
bool old = m_read_failure;
|
bool old = m_read_failure;
|
||||||
m_read_failure = false;
|
m_read_failure = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue