Improve the AudioDecoder API to avoid having to call a function to get the bytes consumed

This commit is contained in:
Henrik Rydgård committed 2024-04-11 16:49:00 +02:00
1 parent 45936e8826
commit 5ed77b58ca
8 files changed
+34 -43

No files matched your search

+2 -1
View File
@@ -218,7 +218,8 @@ public:
while (bgQueue.size() < (size_t)(len * 2)) {
int outBytes = 0;
decoder_->Decode(wave_.raw_data + raw_offset_, wave_.raw_bytes_per_frame, (uint8_t *)buffer_, &outBytes);
int inbytesConsumed = 0;
decoder_->Decode(wave_.raw_data + raw_offset_, wave_.raw_bytes_per_frame, &inbytesConsumed, (uint8_t *)buffer_, &outBytes);
if (!outBytes)
return false;