diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-06-07 13:19:45 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-06-07 13:19:45 +1000 |
| commit | 1f903accd95361735c841c87fdc6494ad3331b40 (patch) | |
| tree | 5b69bd0548c06a93852a576fa90a170fa303a15e /src/audio/stream_info.cpp | |
| parent | 2a568846bd8f1c9e23e86e7570557eed6f18cf9f (diff) | |
| download | tangara-fw-1f903accd95361735c841c87fdc6494ad3331b40.tar.gz | |
Flesh out audio state machine for playback
Also fix mono playback
Diffstat (limited to 'src/audio/stream_info.cpp')
| -rw-r--r-- | src/audio/stream_info.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio/stream_info.cpp b/src/audio/stream_info.cpp index ee85f35d..8fc31530 100644 --- a/src/audio/stream_info.cpp +++ b/src/audio/stream_info.cpp @@ -22,7 +22,8 @@ namespace audio { void InputStream::consume(std::size_t bytes) const { assert(raw_->info->bytes_in_stream >= bytes); - auto new_data = raw_->data.subspan(bytes); + auto new_data = + raw_->data.subspan(bytes, raw_->info->bytes_in_stream - bytes); std::move(new_data.begin(), new_data.end(), raw_->data.begin()); raw_->info->bytes_in_stream = new_data.size_bytes(); } |
