diff options
author | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-10-19 16:32:03 -0300 |
---|---|---|
committer | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-10-20 12:13:40 -0300 |
commit | fa26a5511d5e14f97551bdd1d427ed004b7acd80 (patch) | |
tree | 38a4399e4ccf810c303c9e8ead051000cba2df58 /servers/audio_server.cpp | |
parent | cf7a66195fadd078bb5d6fafebf54e250f5163e7 (diff) |
Fix possible audio input buffer issues
Diffstat (limited to 'servers/audio_server.cpp')
-rw-r--r-- | servers/audio_server.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index d36057b465..37454d9253 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -80,6 +80,14 @@ double AudioDriver::get_mix_time() const { return total; } +void AudioDriver::input_buffer_init(int driver_buffer_frames) { + + const int input_buffer_channels = 2; + input_buffer.resize(driver_buffer_frames * input_buffer_channels * 4); + input_position = 0; + input_size = 0; +} + void AudioDriver::input_buffer_write(int32_t sample) { input_buffer.write[input_position++] = sample; |