From 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 13:23:58 +0200 Subject: 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. --- drivers/coreaudio/audio_driver_coreaudio.cpp | 15 --------------- drivers/coreaudio/audio_driver_coreaudio.h | 1 - 2 files changed, 16 deletions(-) (limited to 'drivers/coreaudio') 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; -- cgit v1.2.3