Skip to content

Commit 3e3fbd0

Browse files
committed
CodecWAV cleanup
1 parent b27229a commit 3e3fbd0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/AudioTools/AudioCodecs/CodecWAV.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ class WAVDecoder : public AudioDecoder {
379379
SingleBuffer<int32_t> buffer24{0};
380380
bool convert8to16 = true; // Optional conversion flag
381381
bool convert24 = true; // Optional conversion flag
382+
const size_t batch_size = 256;
382383

383384
Print &out() { return p_decoder == nullptr ? *p_print : dec_out; }
384385

@@ -398,9 +399,8 @@ class WAVDecoder : public AudioDecoder {
398399
return result;
399400
}
400401

401-
// Convert 8-bit PCM to 16-bit PCM and write out
402+
/// Convert 8-bit PCM to 16-bit PCM and write out
402403
size_t write_out_8to16(const uint8_t *in_ptr, size_t in_size) {
403-
const size_t batch_size = 256;
404404
size_t total_written = 0;
405405
size_t samples_remaining = in_size;
406406
size_t offset = 0;
@@ -418,10 +418,9 @@ class WAVDecoder : public AudioDecoder {
418418
return in_size;
419419
}
420420

421-
// convert 3 byte int24 to 4 byte int32
421+
/// convert 3 byte int24 to 4 byte int32
422422
size_t write_out_24(const uint8_t *in_ptr, size_t in_size) {
423423
// store 1 sample
424-
const size_t batch_size = 256;
425424
buffer24.resize(batch_size);
426425
byte_buffer.resize(3);
427426

0 commit comments

Comments
 (0)