diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-01-20 13:11:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-01-20 13:18:01 +0100 |
commit | 837adb30fd92406c266b9a7ac2a652db2e38cfcc (patch) | |
tree | 61b8fafb842bdaeadcc403b728e7e9bf2555eda3 /drivers/coreaudio | |
parent | c3fd1012de2d0913a375ddfe6ee93035fe5260eb (diff) |
Revert "Exposes capture methods to AudioServer + documentation" #30468
Reverts the following commits:
- c81ec6f26d40b70283958a4ef3e216fb32cbaf14:
"Exposes capture methods to AudioServer, variable renames for
consistency, added documentation."
- 47c558b98abf842910c780294314326662410cdf:
"Expose audio callbacks as signals."
- dabaa11b3c451e9b8f2cca7e563bd9ec51edb169:
"Fix to make sure the capture buffers are deallocated at shutdown.
Silences warnings."
Some documentation improvements were kept for pre-existing methods.
See rationale for reverting these changes in #30468.
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 1e97100a32..c67e90c1df 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 (unsigned int i = 0; i < inNumberFrames * ad->capture_channels; i++) { int32_t sample = ad->input_buf[i] << 16; - ad->capture_buffer_write(sample); + ad->input_buffer_write(sample); if (ad->capture_channels == 1) { - // In case capture device is single channel convert it to Stereo - ad->capture_buffer_write(sample); + // In case input device is single channel convert it to Stereo + ad->input_buffer_write(sample); } } } else { @@ -487,7 +487,7 @@ void AudioDriverCoreAudio::capture_finish() { Error AudioDriverCoreAudio::capture_start() { - capture_buffer_init(buffer_frames); + input_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 capture to keep synchronisation. - capture_position = 0; - capture_size = 0; + // Reset audio input to keep synchronisation. + input_position = 0; + input_size = 0; } } } |