File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 117
117
118
118
#include < limits.h>
119
119
120
- static constexpr unsigned DEFAULT_BUFFER_SIZE = 4096 ;
120
+ static constexpr size_t KILOBYTE = 1024 ;
121
+ static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
122
+
123
+ static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE;
121
124
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10 ;
122
125
123
126
#ifdef ANDROID
@@ -306,12 +309,10 @@ initialize_decoder_and_player(const ReplayGainConfig &replay_gain_config)
306
309
FormatFatalError (" buffer size \" %s\" is not a "
307
310
" positive integer, line %i" ,
308
311
param->value .c_str (), param->line );
309
- buffer_size = tmp;
312
+ buffer_size = tmp * KILOBYTE ;
310
313
} else
311
314
buffer_size = DEFAULT_BUFFER_SIZE;
312
315
313
- buffer_size *= 1024 ;
314
-
315
316
const unsigned buffered_chunks = buffer_size / CHUNK_SIZE;
316
317
317
318
if (buffered_chunks >= 1 << 15 )
You can’t perform that action at this time.
0 commit comments