From f94e764df52eba37bc1b800112d0c3e02f6455d1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 30 Aug 2014 16:29:15 -0400 Subject: AudioCommon: Clean up brace placements --- Source/Core/AudioCommon/CoreAudioSoundStream.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'Source/Core/AudioCommon/CoreAudioSoundStream.cpp') diff --git a/Source/Core/AudioCommon/CoreAudioSoundStream.cpp b/Source/Core/AudioCommon/CoreAudioSoundStream.cpp index e311adc230..cfe6bc6e16 100644 --- a/Source/Core/AudioCommon/CoreAudioSoundStream.cpp +++ b/Source/Core/AudioCommon/CoreAudioSoundStream.cpp @@ -41,13 +41,15 @@ bool CoreAudioSound::Start() desc.componentFlagsMask = 0; desc.componentManufacturer = kAudioUnitManufacturer_Apple; component = FindNextComponent(nullptr, &desc); - if (component == nullptr) { + if (component == nullptr) + { ERROR_LOG(AUDIO, "error finding audio component"); return false; } err = OpenAComponent(component, &audioUnit); - if (err != noErr) { + if (err != noErr) + { ERROR_LOG(AUDIO, "error opening audio component"); return false; } @@ -58,7 +60,8 @@ bool CoreAudioSound::Start() kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &format, sizeof(AudioStreamBasicDescription)); - if (err != noErr) { + if (err != noErr) + { ERROR_LOG(AUDIO, "error setting audio format"); return false; } @@ -69,12 +72,13 @@ bool CoreAudioSound::Start() kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &callback_struct, sizeof callback_struct); - if (err != noErr) { + if (err != noErr) + { ERROR_LOG(AUDIO, "error setting audio callback"); return false; } - err = AudioUnitSetParameter(audioUnit, + err = AudioUnitSetParameter(audioUnit, kHALOutputParam_Volume, kAudioUnitParameterFlag_Output, 0, m_volume / 100., 0); @@ -82,13 +86,15 @@ bool CoreAudioSound::Start() ERROR_LOG(AUDIO, "error setting volume"); err = AudioUnitInitialize(audioUnit); - if (err != noErr) { + if (err != noErr) + { ERROR_LOG(AUDIO, "error initializing audiounit"); return false; } err = AudioOutputUnitStart(audioUnit); - if (err != noErr) { + if (err != noErr) + { ERROR_LOG(AUDIO, "error starting audiounit"); return false; } @@ -99,7 +105,7 @@ bool CoreAudioSound::Start() void CoreAudioSound::SetVolume(int volume) { OSStatus err; - m_volume = volume; + m_volume = volume; err = AudioUnitSetParameter(audioUnit, kHALOutputParam_Volume, -- cgit v1.2.3