mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +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
Notes:
sideshowbarker
2024-07-19 13:15:13 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/6e90f00925e Pull-request: https://github.com/SerenityOS/serenity/pull/311
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue