File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/AudioTools/AudioCodecs Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -379,6 +379,7 @@ class WAVDecoder : public AudioDecoder {
379
379
SingleBuffer<int32_t > buffer24{0 };
380
380
bool convert8to16 = true ; // Optional conversion flag
381
381
bool convert24 = true ; // Optional conversion flag
382
+ const size_t batch_size = 256 ;
382
383
383
384
Print &out () { return p_decoder == nullptr ? *p_print : dec_out; }
384
385
@@ -398,9 +399,8 @@ class WAVDecoder : public AudioDecoder {
398
399
return result;
399
400
}
400
401
401
- // Convert 8-bit PCM to 16-bit PCM and write out
402
+ // / Convert 8-bit PCM to 16-bit PCM and write out
402
403
size_t write_out_8to16 (const uint8_t *in_ptr, size_t in_size) {
403
- const size_t batch_size = 256 ;
404
404
size_t total_written = 0 ;
405
405
size_t samples_remaining = in_size;
406
406
size_t offset = 0 ;
@@ -418,10 +418,9 @@ class WAVDecoder : public AudioDecoder {
418
418
return in_size;
419
419
}
420
420
421
- // convert 3 byte int24 to 4 byte int32
421
+ // / convert 3 byte int24 to 4 byte int32
422
422
size_t write_out_24 (const uint8_t *in_ptr, size_t in_size) {
423
423
// store 1 sample
424
- const size_t batch_size = 256 ;
425
424
buffer24.resize (batch_size);
426
425
byte_buffer.resize (3 );
427
426
You can’t perform that action at this time.
0 commit comments