diff options
| author | Soren Jorvang <soren.jorvang@gmail.com> | 2011-02-03 21:11:06 +0000 |
|---|---|---|
| committer | Soren Jorvang <soren.jorvang@gmail.com> | 2011-02-03 21:11:06 +0000 |
| commit | 435b25fa55b56e52508776672d8fee8d407f813b (patch) | |
| tree | 116645f173af12104400d926e5f847707e385fb4 /Source/Core/AudioCommon | |
| parent | dfe84ce0acf288157a867f0df1678930b281fd40 (diff) | |
Fix the CMake build.
Prevent the PS3 HID crash until I can debug it.
AudioUnits are enabled by default.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7052 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon')
| -rw-r--r-- | Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/AudioCommon/Src/Mixer.cpp | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp index a230d07a75..d09bce85f9 100644 --- a/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/CoreAudioSoundStream.cpp @@ -46,15 +46,14 @@ bool CoreAudioSound::Start() AURenderCallbackStruct callback_struct; AudioStreamBasicDescription format; ComponentDescription desc; - UInt32 enableIO = 1; + Component component; desc.componentType = kAudioUnitType_Output; desc.componentSubType = kAudioUnitSubType_DefaultOutput; desc.componentFlags = 0; desc.componentFlagsMask = 0; desc.componentManufacturer = kAudioUnitManufacturer_Apple; - - Component component = FindNextComponent(NULL, &desc); + component = FindNextComponent(NULL, &desc); if (component == NULL) { ERROR_LOG(AUDIO, "error finding audio component"); return false; @@ -66,11 +65,6 @@ bool CoreAudioSound::Start() return false; } - AudioUnitSetProperty(audioUnit, - kAudioOutputUnitProperty_EnableIO, - kAudioUnitScope_Output, 0, &enableIO, - sizeof enableIO); - FillOutASBDForLPCM(format, m_mixer->GetSampleRate(), 2, 16, 16, false, false, false); err = AudioUnitSetProperty(audioUnit, diff --git a/Source/Core/AudioCommon/Src/Mixer.cpp b/Source/Core/AudioCommon/Src/Mixer.cpp index bed8f0e21f..c8eece73c7 100644 --- a/Source/Core/AudioCommon/Src/Mixer.cpp +++ b/Source/Core/AudioCommon/Src/Mixer.cpp @@ -31,8 +31,6 @@ #include <tmmintrin.h> #endif -static const __m128i sr_mask = _mm_set_epi32(0x0C0D0E0FL, 0x08090A0BL, 0x04050607L, 0x00010203L); - // Executed from sound stream thread unsigned int CMixer::Mix(short* samples, unsigned int numSamples) { @@ -64,6 +62,10 @@ unsigned int CMixer::Mix(short* samples, unsigned int numSamples) if (m_sampleRate == 32000) { #if _M_SSE >= 0x301 + static const __m128i sr_mask = + _mm_set_epi32(0x0C0D0E0FL, 0x08090A0BL, + 0x04050607L, 0x00010203L); + if (cpu_info.bSSSE3 && !((numLeft * 2) % 8)) { for (unsigned int i = 0; i < numLeft * 2; i += 8) |
