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 /drivers/coreaudio | |
parent | cf7a66195fadd078bb5d6fafebf54e250f5163e7 (diff) |
Fix possible audio input buffer issues
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index aaec63d7ff..850b90d59b 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -145,9 +145,6 @@ Error AudioDriverCoreAudio::init() { unsigned int buffer_size = buffer_frames * channels; samples_in.resize(buffer_size); input_buf.resize(buffer_size); - input_buffer.resize(buffer_size * 8); - input_position = 0; - input_size = 0; print_verbose("CoreAudio: detected " + itos(channels) + " channels"); print_verbose("CoreAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); @@ -487,6 +484,8 @@ void AudioDriverCoreAudio::capture_finish() { Error AudioDriverCoreAudio::capture_start() { + input_buffer_init(buffer_frames); + OSStatus result = AudioOutputUnitStart(input_unit); if (result != noErr) { ERR_PRINTS("AudioOutputUnitStart failed, code: " + itos(result)); |