Merge pull request #3602 from OatmealDome/coreaudio
CoreAudioSound: Minor clean up
This commit is contained in:
commit
08c9e3b7a4
|
@ -2,7 +2,7 @@
|
||||||
// Licensed under GPLv2+
|
// Licensed under GPLv2+
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <AudioUnit/AudioUnit.h>
|
||||||
|
|
||||||
#include "AudioCommon/CoreAudioSoundStream.h"
|
#include "AudioCommon/CoreAudioSoundStream.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
|
@ -73,7 +73,7 @@ bool CoreAudioSound::Start()
|
||||||
|
|
||||||
err = AudioUnitSetParameter(audioUnit,
|
err = AudioUnitSetParameter(audioUnit,
|
||||||
kHALOutputParam_Volume,
|
kHALOutputParam_Volume,
|
||||||
kAudioUnitParameterFlag_Output, 0,
|
kAudioUnitScope_Output, 0,
|
||||||
m_volume / 100., 0);
|
m_volume / 100., 0);
|
||||||
if (err != noErr)
|
if (err != noErr)
|
||||||
ERROR_LOG(AUDIO, "error setting volume");
|
ERROR_LOG(AUDIO, "error setting volume");
|
||||||
|
@ -102,7 +102,7 @@ void CoreAudioSound::SetVolume(int volume)
|
||||||
|
|
||||||
err = AudioUnitSetParameter(audioUnit,
|
err = AudioUnitSetParameter(audioUnit,
|
||||||
kHALOutputParam_Volume,
|
kHALOutputParam_Volume,
|
||||||
kAudioUnitParameterFlag_Output, 0,
|
kAudioUnitScope_Output, 0,
|
||||||
volume / 100., 0);
|
volume / 100., 0);
|
||||||
if (err != noErr)
|
if (err != noErr)
|
||||||
ERROR_LOG(AUDIO, "error setting volume");
|
ERROR_LOG(AUDIO, "error setting volume");
|
||||||
|
|
Loading…
Reference in New Issue