diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /drivers/coreaudio | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'drivers/coreaudio')
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.cpp | 15 | ||||
-rw-r--r-- | drivers/coreaudio/audio_driver_coreaudio.h | 1 |
2 files changed, 0 insertions, 16 deletions
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp index 76d2d13dfe..d71d8cdaba 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.cpp +++ b/drivers/coreaudio/audio_driver_coreaudio.cpp @@ -168,7 +168,6 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { - AudioDriverCoreAudio *ad = (AudioDriverCoreAudio *)inRefCon; if (!ad->active || !ad->try_lock()) { @@ -182,18 +181,15 @@ OSStatus AudioDriverCoreAudio::output_callback(void *inRefCon, ad->start_counting_ticks(); for (unsigned int i = 0; i < ioData->mNumberBuffers; i++) { - AudioBuffer *abuf = &ioData->mBuffers[i]; unsigned int frames_left = inNumberFrames; int16_t *out = (int16_t *)abuf->mData; while (frames_left) { - unsigned int frames = MIN(frames_left, ad->buffer_frames); ad->audio_server_process(frames, ad->samples_in.ptrw()); for (unsigned int j = 0; j < frames * ad->channels; j++) { - out[j] = ad->samples_in[j] >> 16; } @@ -213,7 +209,6 @@ OSStatus AudioDriverCoreAudio::input_callback(void *inRefCon, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { - AudioDriverCoreAudio *ad = (AudioDriverCoreAudio *)inRefCon; if (!ad->active) { return 0; @@ -475,7 +470,6 @@ void AudioDriverCoreAudio::capture_finish() { } Error AudioDriverCoreAudio::capture_start() { - input_buffer_init(buffer_frames); OSStatus result = AudioOutputUnitStart(input_unit); @@ -487,7 +481,6 @@ Error AudioDriverCoreAudio::capture_start() { } Error AudioDriverCoreAudio::capture_stop() { - if (input_unit) { OSStatus result = AudioOutputUnitStop(input_unit); if (result != noErr) { @@ -501,7 +494,6 @@ Error AudioDriverCoreAudio::capture_stop() { #ifdef OSX_ENABLED Array AudioDriverCoreAudio::_get_device_list(bool capture) { - Array list; list.push_back("Default"); @@ -558,7 +550,6 @@ Array AudioDriverCoreAudio::_get_device_list(bool capture) { } void AudioDriverCoreAudio::_set_device(const String &device, bool capture) { - AudioDeviceID deviceId; bool found = false; if (device != "Default") { @@ -639,17 +630,14 @@ void AudioDriverCoreAudio::_set_device(const String &device, bool capture) { } Array AudioDriverCoreAudio::get_device_list() { - return _get_device_list(); } String AudioDriverCoreAudio::get_device() { - return device_name; } void AudioDriverCoreAudio::set_device(String device) { - device_name = device; if (active) { _set_device(device_name); @@ -657,7 +645,6 @@ void AudioDriverCoreAudio::set_device(String device) { } void AudioDriverCoreAudio::capture_set_device(const String &p_name) { - capture_device_name = p_name; if (active) { _set_device(capture_device_name, true); @@ -665,12 +652,10 @@ void AudioDriverCoreAudio::capture_set_device(const String &p_name) { } Array AudioDriverCoreAudio::capture_get_device_list() { - return _get_device_list(true); } String AudioDriverCoreAudio::capture_get_device() { - return capture_device_name; } diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h index 89dd52181f..6b7a35588f 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.h +++ b/drivers/coreaudio/audio_driver_coreaudio.h @@ -41,7 +41,6 @@ #endif class AudioDriverCoreAudio : public AudioDriver { - AudioComponentInstance audio_unit = nullptr; AudioComponentInstance input_unit = nullptr; |