AK/LibAudio: Add stream read operators to AK::BufferStream, and use it in AWavLoader

At the same time, we allow chaining of streaming operators, and add a
way to check for partial reads (also used in WAV parsing).
This commit is contained in:
Robin Burchell 2019-07-14 00:28:30 +02:00 committed by Andreas Kling
commit 7b75632e5c
Notes: sideshowbarker 2024-07-19 13:16:13 +09:00
3 changed files with 116 additions and 88 deletions

View file

@ -9,6 +9,6 @@ public:
RefPtr<AWavFile> load_wav(const StringView& path);
const char* error_string() { return m_error_string.characters(); }
private:
RefPtr<AWavFile> parse_wav(const ByteBuffer& buffer);
RefPtr<AWavFile> parse_wav(ByteBuffer& buffer);
String m_error_string;
};