diff options
| author | degasus <wickmarkus@web.de> | 2012-12-27 10:36:54 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2012-12-27 10:36:54 +0100 |
| commit | 316a33d1e68ab47b2870345a04bb9dfd4f383f28 (patch) | |
| tree | 03b40807def9787df30976ecb53f09d6c6084c13 /Source/Core/AudioCommon | |
| parent | 53398ca5d8bc6e73a726c9d803db5a956c22cf6a (diff) | |
| parent | 94116bf89c917309b7e7b2a2b46bf2f43f3219db (diff) | |
Merge branch 'master' into GLSL-master
Conflicts:
Source/Core/DolphinWX/Src/VideoConfigDiag.h
Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
Diffstat (limited to 'Source/Core/AudioCommon')
4 files changed, 17 insertions, 3 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommon.cpp b/Source/Core/AudioCommon/Src/AudioCommon.cpp index b73757cad5..8a568448a3 100644 --- a/Source/Core/AudioCommon/Src/AudioCommon.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommon.cpp @@ -26,6 +26,7 @@ #include "CoreAudioSoundStream.h" #include "OpenALStream.h" #include "PulseAudioStream.h" +#include "../../Core/Src/Movie.h" namespace AudioCommon { @@ -115,7 +116,12 @@ namespace AudioCommon return backends; } - bool UseJIT() { + bool UseJIT() + { + if (!Movie::IsDSPHLE() && Movie::IsPlayingInput() && Movie::IsConfigSaved()) + { + return true; + } return ac_Config.m_EnableJIT; } diff --git a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp index d09bce85f9..f6d5d31bed 100644 --- a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp @@ -87,6 +87,13 @@ bool CoreAudioSound::Start() return false; } + err = AudioUnitSetParameter(audioUnit, + kHALOutputParam_Volume, + kAudioUnitParameterFlag_Output, 0, + m_volume / 100., 0); + if (err != noErr) + ERROR_LOG(AUDIO, "error setting volume"); + err = AudioUnitInitialize(audioUnit); if (err != noErr) { ERROR_LOG(AUDIO, "error initializing audiounit"); @@ -105,6 +112,7 @@ bool CoreAudioSound::Start() void CoreAudioSound::SetVolume(int volume) { OSStatus err; + m_volume = volume; err = AudioUnitSetParameter(audioUnit, kHALOutputParam_Volume, diff --git a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h index b7f7d96f53..581e4aabd8 100644 --- a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h +++ b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.h @@ -47,6 +47,7 @@ public: private: AudioUnit audioUnit; + int m_volume; static OSStatus callback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, diff --git a/Source/Core/AudioCommon/Src/OpenALStream.cpp b/Source/Core/AudioCommon/Src/OpenALStream.cpp index 99220f0ed2..2abd357782 100644 --- a/Source/Core/AudioCommon/Src/OpenALStream.cpp +++ b/Source/Core/AudioCommon/Src/OpenALStream.cpp @@ -123,7 +123,6 @@ void OpenALStream::SoundLoop() { Common::SetCurrentThreadName("Audio thread - openal"); - ALenum err; u32 ulFrequency = m_mixer->GetSampleRate(); memset(uiBuffers, 0, OAL_NUM_BUFFERS * sizeof(ALuint)); @@ -144,8 +143,8 @@ void OpenALStream::SoundLoop() // Set the default sound volume as saved in the config file. alSourcef(uiSource, AL_GAIN, fVolume); - err = alGetError(); // TODO: Error handling + //ALenum err = alGetError(); ALint iBuffersFilled = 0; ALint iBuffersProcessed = 0; |
