File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 13
13
#include " miniaudio.h"
14
14
15
15
#define MA_BUFFER_COUNT 100
16
+ #define MA_BUFFER_SIZE 1200
16
17
#define MA_START_COUNT MA_BUFFER_COUNT - 2
17
18
#define MA_DELAY 10
18
19
@@ -108,6 +109,7 @@ class MiniAudioStream : public AudioStream {
108
109
109
110
bool begin () override {
110
111
TRACEI ();
112
+ setupBuffers ();
111
113
if (config.is_output && !config.is_input )
112
114
config_ma = ma_device_config_init (ma_device_type_playback);
113
115
else if (!config.is_output && config.is_input )
@@ -310,7 +312,7 @@ class MiniAudioStream : public AudioStream {
310
312
// you can move data from pInput into pOutput. Never process more than
311
313
// frameCount frames.
312
314
313
- void setupBuffers (int size) {
315
+ void setupBuffers (int size = MA_BUFFER_SIZE ) {
314
316
std::lock_guard<std::mutex> guard (write_mtx);
315
317
if (is_buffers_setup.load ()) return ;
316
318
You can’t perform that action at this time.
0 commit comments