From 95517a9741175f15124dc11e132620a23bec7a19 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 5 Sep 2011 09:43:23 -0700 Subject: vs2010: Disable LTCG for realz --- Source/Core/AudioCommon/AudioCommon.vcxproj | 2 -- 1 file changed, 2 deletions(-) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/AudioCommon.vcxproj b/Source/Core/AudioCommon/AudioCommon.vcxproj index b37cbf4ce7..a82ab9aecc 100644 --- a/Source/Core/AudioCommon/AudioCommon.vcxproj +++ b/Source/Core/AudioCommon/AudioCommon.vcxproj @@ -45,7 +45,6 @@ false StaticLibrary Unicode - true StaticLibrary @@ -56,7 +55,6 @@ false StaticLibrary Unicode - true StaticLibrary -- cgit v1.2.3 From 958891b4ebd463253d85c51577f52a23237b8208 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:49:08 +0100 Subject: Compile with OpenAL support on OS X. --- Source/Core/AudioCommon/CMakeLists.txt | 50 ++++++++++++++++----------------- Source/Core/AudioCommon/Src/aldlist.cpp | 3 ++ 2 files changed, 28 insertions(+), 25 deletions(-) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 51476a6ea6..be8c58d14a 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -6,33 +6,33 @@ set(SRCS Src/AudioCommon.cpp set(LIBS "") +if(ALSA_FOUND) + set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) + set(LIBS ${LIBS} ${ALSA_LIBRARIES}) +endif(ALSA_FOUND) + +if(AO_FOUND) + set(SRCS ${SRCS} Src/AOSoundStream.cpp) + set(LIBS ${LIBS} ${AO_LIBRARIES}) +endif(AO_FOUND) + +if(OPENAL_FOUND) + set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) + set(LIBS ${LIBS} ${OPENAL_LIBRARY}) +endif(OPENAL_FOUND) + +if(PULSEAUDIO_FOUND) + set(SRCS ${SRCS} Src/PulseAudioStream.cpp) + set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) +endif(PULSEAUDIO_FOUND) + +if(WIN32) + set(SRCS ${SRCS} Src/DSoundStream.cpp) + set(SRCS ${SRCS} Src/XAudio2Stream.cpp) +endif(WIN32) + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SRCS ${SRCS} Src/CoreAudioSoundStream.cpp) -else() - if(ALSA_FOUND) - set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) - set(LIBS ${LIBS} ${ALSA_LIBRARIES}) - endif(ALSA_FOUND) - - if(AO_FOUND) - set(SRCS ${SRCS} Src/AOSoundStream.cpp) - set(LIBS ${LIBS} ${AO_LIBRARIES}) - endif(AO_FOUND) - - if(OPENAL_FOUND) - set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) - set(LIBS ${LIBS} openal) - endif(OPENAL_FOUND) - - if(PULSEAUDIO_FOUND) - set(SRCS ${SRCS} Src/PulseAudioStream.cpp) - set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) - endif(PULSEAUDIO_FOUND) - - if(WIN32) - set(SRCS ${SRCS} Src/DSoundStream.cpp) - set(SRCS ${SRCS} Src/XAudio2Stream.cpp) - endif(WIN32) endif() add_library(audiocommon STATIC ${SRCS}) diff --git a/Source/Core/AudioCommon/Src/aldlist.cpp b/Source/Core/AudioCommon/Src/aldlist.cpp index 2008842486..69d42148ae 100644 --- a/Source/Core/AudioCommon/Src/aldlist.cpp +++ b/Source/Core/AudioCommon/Src/aldlist.cpp @@ -27,6 +27,9 @@ #ifdef _WIN32 #include "../../../../Externals/OpenAL/include/al.h" #include "../../../../Externals/OpenAL/include/alc.h" +#elif defined(__APPLE__) +#include +#include #else #include #include -- cgit v1.2.3 From d00b719966eda3c27b5fcb96bce50038f52611d5 Mon Sep 17 00:00:00 2001 From: nitsuja Date: Sun, 18 Dec 2011 02:25:50 -0800 Subject: give the audio thread a name (this doesn't really matter, but it was bugging me) --- Source/Core/AudioCommon/Src/DSoundStream.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/Src/DSoundStream.cpp b/Source/Core/AudioCommon/Src/DSoundStream.cpp index 38fbc2a851..78e79e1057 100644 --- a/Source/Core/AudioCommon/Src/DSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/DSoundStream.cpp @@ -96,6 +96,8 @@ bool DSound::WriteDataToBuffer(DWORD dwOffset, // Our own write // The audio thread. void DSound::SoundLoop() { + Common::SetCurrentThreadName("Audio thread"); + currentPos = 0; lastPos = 0; dsBuffer->Play(0, 0, DSBPLAY_LOOPING); -- cgit v1.2.3 From c53593a40a765557dbf5127a8c0bd2531e416148 Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 1 Jan 2012 14:32:54 +1100 Subject: Moved the Audio Throttle option to the Framelimit drop-down. The Audio Throttle should never be used alongside the frame limiter as that can cause audio sync issues. --- Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | 5 ++--- Source/Core/AudioCommon/Src/AudioCommonConfig.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index 1ab4c261e2..07698ada9a 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -18,6 +18,7 @@ #include "AudioCommon.h" #include "CommonPaths.h" #include "FileUtil.h" +#include "..\..\Core\Src\ConfigManager.h" AudioCommonConfig ac_Config; @@ -31,7 +32,6 @@ void AudioCommonConfig::Load() file.Load(File::GetUserPath(F_DSPCONFIG_IDX)); file.Get("Config", "EnableDTKMusic", &m_EnableDTKMusic, true); - file.Get("Config", "EnableThrottle", &m_EnableThrottle, true); file.Get("Config", "EnableJIT", &m_EnableJIT, true); file.Get("Config", "DumpAudio", &m_DumpAudio, false); #if defined __linux__ && HAVE_ALSA @@ -54,7 +54,6 @@ void AudioCommonConfig::SaveSettings() file.Load(File::GetUserPath(F_DSPCONFIG_IDX)); file.Set("Config", "EnableDTKMusic", m_EnableDTKMusic); - file.Set("Config", "EnableThrottle", m_EnableThrottle); file.Set("Config", "EnableJIT", m_EnableJIT); file.Set("Config", "DumpAudio", m_DumpAudio); file.Set("Config", "Backend", sBackend); @@ -67,7 +66,7 @@ void AudioCommonConfig::SaveSettings() // Update according to the values (stream/mixer) void AudioCommonConfig::Update() { if (soundStream) { - soundStream->GetMixer()->SetThrottle(m_EnableThrottle); + soundStream->GetMixer()->SetThrottle(SConfig::GetInstance().m_Framelimit == 2); soundStream->GetMixer()->SetDTKMusic(m_EnableDTKMusic); soundStream->SetVolume(m_Volume); } diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.h b/Source/Core/AudioCommon/Src/AudioCommonConfig.h index 49124344e0..076ef2d4e1 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.h +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.h @@ -34,7 +34,6 @@ struct AudioCommonConfig { bool m_EnableDTKMusic; - bool m_EnableThrottle; bool m_EnableJIT; bool m_DumpAudio; int m_Volume; -- cgit v1.2.3 From ba545ec1e9cf9f4457b7b2424b5187be277bd49f Mon Sep 17 00:00:00 2001 From: skidau Date: Sun, 1 Jan 2012 18:09:39 +1100 Subject: Build fix --- Source/Core/AudioCommon/Src/AudioCommonConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp index 07698ada9a..533c6b4313 100644 --- a/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommonConfig.cpp @@ -18,7 +18,7 @@ #include "AudioCommon.h" #include "CommonPaths.h" #include "FileUtil.h" -#include "..\..\Core\Src\ConfigManager.h" +#include "../../Core/Src/ConfigManager.h" AudioCommonConfig ac_Config; -- cgit v1.2.3 From 6f1b2d7748c2ebe5db7e17d0308f4106d04e71d4 Mon Sep 17 00:00:00 2001 From: nitsuja Date: Fri, 30 Dec 2011 20:22:48 -0800 Subject: name all audio threads (that I know how to) for debugging, as suggested in response to revision d00b719966ed. --- Source/Core/AudioCommon/Src/AOSoundStream.cpp | 2 ++ Source/Core/AudioCommon/Src/AlsaSoundStream.cpp | 1 + Source/Core/AudioCommon/Src/DSoundStream.cpp | 4 ++-- Source/Core/AudioCommon/Src/OpenALStream.cpp | 2 ++ Source/Core/AudioCommon/Src/PulseAudioStream.cpp | 2 ++ 5 files changed, 9 insertions(+), 2 deletions(-) (limited to 'Source/Core/AudioCommon') diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.cpp b/Source/Core/AudioCommon/Src/AOSoundStream.cpp index e864ad1211..99ae2e661c 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AOSoundStream.cpp @@ -25,6 +25,8 @@ void AOSound::SoundLoop() { + Common::SetCurrentThreadName("Audio thread - ao"); + uint_32 numBytesToRender = 256; ao_initialize(); default_driver = ao_default_driver_id(); diff --git a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp index 76f13b6cb1..710275d55a 100644 --- a/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/AlsaSoundStream.cpp @@ -60,6 +60,7 @@ void AlsaSound::SoundLoop() thread_data = 2; return; } + Common::SetCurrentThreadName("Audio thread - alsa"); while (!thread_data) { m_mixer->Mix(reinterpret_cast(mix_buffer), frames_to_deliver); diff --git a/Source/Core/AudioCommon/Src/DSoundStream.cpp b/Source/Core/AudioCommon/Src/DSoundStream.cpp index 78e79e1057..b252dc90c5 100644 --- a/Source/Core/AudioCommon/Src/DSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/DSoundStream.cpp @@ -96,7 +96,7 @@ bool DSound::WriteDataToBuffer(DWORD dwOffset, // Our own write // The audio thread. void DSound::SoundLoop() { - Common::SetCurrentThreadName("Audio thread"); + Common::SetCurrentThreadName("Audio thread - dsound"); currentPos = 0; lastPos = 0; @@ -132,7 +132,7 @@ bool DSound::Start() DWORD num1; short* p1; - dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, 0); + dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, DSBLOCK_ENTIREBUFFER); memset(p1, 0, num1); dsBuffer->Unlock(p1, num1, 0, 0); thread = std::thread(std::mem_fun(&DSound::SoundLoop), this); diff --git a/Source/Core/AudioCommon/Src/OpenALStream.cpp b/Source/Core/AudioCommon/Src/OpenALStream.cpp index 91d2b3270c..99220f0ed2 100644 --- a/Source/Core/AudioCommon/Src/OpenALStream.cpp +++ b/Source/Core/AudioCommon/Src/OpenALStream.cpp @@ -121,6 +121,8 @@ void OpenALStream::Clear(bool mute) void OpenALStream::SoundLoop() { + Common::SetCurrentThreadName("Audio thread - openal"); + ALenum err; u32 ulFrequency = m_mixer->GetSampleRate(); diff --git a/Source/Core/AudioCommon/Src/PulseAudioStream.cpp b/Source/Core/AudioCommon/Src/PulseAudioStream.cpp index 6b3f9e7217..4851b4bd12 100644 --- a/Source/Core/AudioCommon/Src/PulseAudioStream.cpp +++ b/Source/Core/AudioCommon/Src/PulseAudioStream.cpp @@ -58,6 +58,8 @@ void PulseAudio::Update() // Called on audio thread. void PulseAudio::SoundLoop() { + Common::SetCurrentThreadName("Audio thread - pulse"); + thread_running = PulseInit(); while (thread_running) -- cgit v1.2.3