diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-30 18:20:13 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-30 18:20:13 -0400 |
| commit | 2c7bcd0d048c2e298a5d1e94cb493c6d879f6dd9 (patch) | |
| tree | 0159e4c50212488aca33dcff7dbe09ed4e251eed /Source/Core/AudioCommon/CoreAudioSoundStream.cpp | |
| parent | 77aef014a0352d819e8ea63bafb6262b9af485cb (diff) | |
| parent | eb535be8741fd8672b5db972ca43360ca14a9a78 (diff) | |
Merge pull request #911 from lioncash/braces
Clean up brace placements within the project.
Diffstat (limited to 'Source/Core/AudioCommon/CoreAudioSoundStream.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/CoreAudioSoundStream.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
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, |
