summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/CoreAudioSoundStream.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-30 16:29:15 -0400
committerLioncash <mathew1800@gmail.com>2014-08-30 18:06:42 -0400
commitf94e764df52eba37bc1b800112d0c3e02f6455d1 (patch)
tree2289b335c2babba85f012c3aa83391dde5fab2fd /Source/Core/AudioCommon/CoreAudioSoundStream.cpp
parentba4934b75eb13cc04a54efd54a9d6f286d255083 (diff)
AudioCommon: Clean up brace placements
Diffstat (limited to 'Source/Core/AudioCommon/CoreAudioSoundStream.cpp')
-rw-r--r--Source/Core/AudioCommon/CoreAudioSoundStream.cpp22
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,