diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-01-11 05:54:30 +0000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2024-01-11 05:54:30 +0000 |
| commit | 0e04eb918ec976017276306181282769d8896c83 (patch) | |
| tree | 562da509df2ab03d3906cf3c0f56063f6acc9865 /src/codecs/source_buffer.cpp | |
| parent | 55bde70b9651b411ac0135bd4704f5b6972ea799 (diff) | |
| download | tangara-fw-0e04eb918ec976017276306181282769d8896c83.tar.gz | |
wav-codec (#13)
here is a wav decoder, enjoy!
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/13
Reviewed-by: cooljqln <cooljqln@noreply.codeberg.org>
Co-authored-by: ailurux <ailuruxx@gmail.com>
Co-committed-by: ailurux <ailuruxx@gmail.com>
Diffstat (limited to 'src/codecs/source_buffer.cpp')
| -rw-r--r-- | src/codecs/source_buffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codecs/source_buffer.cpp b/src/codecs/source_buffer.cpp index bf8951f3..1db2e6c2 100644 --- a/src/codecs/source_buffer.cpp +++ b/src/codecs/source_buffer.cpp @@ -62,7 +62,7 @@ auto SourceBuffer::AddBytes(std::function<size_t(cpp::span<std::byte>)> writer) auto SourceBuffer::ConsumeBytes( std::function<size_t(cpp::span<std::byte>)> reader) -> void { size_t bytes_consumed = std::invoke( - reader, buffer_.subspan(offset_of_bytes_).first(bytes_in_buffer_)); + reader, buffer_.subspan(offset_of_bytes_, bytes_in_buffer_)); assert(bytes_consumed <= bytes_in_buffer_); bytes_in_buffer_ -= bytes_consumed; |
