diff options
author | Saracen <SaracenOne@gmail.com> | 2019-07-09 18:11:11 +0100 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2019-07-15 15:12:29 +0100 |
commit | c81ec6f26d40b70283958a4ef3e216fb32cbaf14 (patch) | |
tree | 7d9904af155e1e0d20b4348868a9ecb29f969589 /drivers/coreaudio | |
parent | e6230a36f866c09f5ef9d70af33709d95b6fd812 (diff) |
Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 97d16d3a6a..3b06c47244 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -233,11 +233,11 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon, if (result == noErr) { for (int i = 0; i < inNumberFrames * ad->capture_channels; i++) { int32_t sample = ad->input_buf[i] << 16; - ad->input_buffer_write(sample); + ad->capture_buffer_write(sample); if (ad->capture_channels == 1) { - // In case input device is single channel convert it to Stereo - ad->input_buffer_write(sample); + // In case capture device is single channel convert it to Stereo + ad->capture_buffer_write(sample); } } } else { @@ -487,7 +487,7 @@ void AudioDriverCoreAudio::capture_finish() { Error AudioDriverCoreAudio::capture_start() { - input_buffer_init(buffer_frames); + capture_buffer_init(buffer_frames); OSStatus result = AudioOutputUnitStart(input_unit); if (result != noErr) { @@ -642,9 +642,9 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) { ERR_FAIL_COND(result != noErr); if (capture) { - // Reset audio input to keep synchronisation. - input_position = 0; - input_size = 0; + // Reset audio capture to keep synchronisation. + capture_position = 0; + capture_size = 0; } } } |