diff --git a/rpcs3-tests/rpcs3-tests.vcxproj b/rpcs3-tests/rpcs3-tests.vcxproj
index e71d6ae721..7956ee5f07 100644
--- a/rpcs3-tests/rpcs3-tests.vcxproj
+++ b/rpcs3-tests/rpcs3-tests.vcxproj
@@ -108,6 +108,12 @@
{c4a10229-4712-4bd2-b63e-50d93c67a038}
+
+ {30a05c4d-f5fd-421c-a864-17a64bdeaa75}
+
+
+ {78cb2f39-b809-4a06-8329-8c0a19119d3d}
+
{24c45343-fd20-5c92-81c1-35a2ae841e79}
diff --git a/rpcs3.sln b/rpcs3.sln
index 6bdd5a94cf..5769fb4e35 100644
--- a/rpcs3.sln
+++ b/rpcs3.sln
@@ -201,6 +201,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shader_code", "rsx_program_
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rsx_decompiler", "rsx_program_decompiler\rsx_decompiler\rsx_decompiler.vcxproj", "{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XAudio", "rpcs3\XAudio.vcxproj", "{78CB2F39-B809-4A06-8329-8C0A19119D3D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenAL", "rpcs3\OpenAL.vcxproj", "{30A05C4D-F5FD-421C-A864-17A64BDEAA75}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug - LLVM|x64 = Debug - LLVM|x64
@@ -672,6 +676,34 @@ Global
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release - LLVM|x64.Build.0 = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.ActiveCfg = Release|x64
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F}.Release|x64.Build.0 = Release|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - MemLeak|x64.ActiveCfg = Debug - MemLeak|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug - MemLeak|x64.Build.0 = Debug - MemLeak|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug|x64.ActiveCfg = Debug|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Debug|x64.Build.0 = Debug|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.DLL Debug|x64.ActiveCfg = Debug|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.DLL Debug|x64.Build.0 = Debug|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.DLL Release|x64.ActiveCfg = Release|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.DLL Release|x64.Build.0 = Release|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Release|x64.ActiveCfg = Release|x64
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}.Release|x64.Build.0 = Release|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug - LLVM|x64.ActiveCfg = Debug - LLVM|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug - LLVM|x64.Build.0 = Debug - LLVM|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug - MemLeak|x64.ActiveCfg = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug - MemLeak|x64.Build.0 = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug|x64.ActiveCfg = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Debug|x64.Build.0 = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.DLL Debug|x64.ActiveCfg = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.DLL Debug|x64.Build.0 = Debug|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.DLL Release|x64.ActiveCfg = Release|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.DLL Release|x64.Build.0 = Release|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Release - LLVM|x64.ActiveCfg = Release - LLVM|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Release - LLVM|x64.Build.0 = Release - LLVM|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Release|x64.ActiveCfg = Release|x64
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -707,5 +739,7 @@ Global
{FAC9B17B-F4B8-4B75-8AEB-C8C7CB92B078} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{3384223A-6D97-4799-9862-359F85312892} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{7D73447B-3D2D-4DFE-BF62-57E644C1D09F} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
EndGlobalSection
EndGlobal
diff --git a/rpcs3/Emu/Audio/AudioManager.cpp b/rpcs3/Emu/Audio/AudioManager.cpp
index 39e21ef462..615a518c06 100644
--- a/rpcs3/Emu/Audio/AudioManager.cpp
+++ b/rpcs3/Emu/Audio/AudioManager.cpp
@@ -1,9 +1,7 @@
#include "stdafx.h"
+#include "Emu/System.h"
#include "AudioManager.h"
-#include "AL/OpenALThread.h"
#include "Emu/state.h"
-#include "Null/NullAudioThread.h"
-#include "XAudio2/XAudio2Thread.h"
AudioManager::AudioManager() : m_audio_out(nullptr)
{
@@ -20,19 +18,10 @@ void AudioManager::Init()
m_audio_info.Init();
- switch (rpcs3::state.config.audio.out.value())
- {
- default:
- case audio_output_type::Null: m_audio_out = new NullAudioThread(); break;
- case audio_output_type::OpenAL: m_audio_out = new OpenALThread(); break;
-#ifdef _MSC_VER
- case audio_output_type::XAudio2: m_audio_out = new XAudio2Thread(); break;
-#endif
- }
+ m_audio_out = Emu.GetCallbacks().get_audio();
}
void AudioManager::Close()
{
- delete m_audio_out;
- m_audio_out = nullptr;
+ m_audio_out.reset();
}
diff --git a/rpcs3/Emu/Audio/AudioManager.h b/rpcs3/Emu/Audio/AudioManager.h
index a1f50c84da..149fa15ede 100644
--- a/rpcs3/Emu/Audio/AudioManager.h
+++ b/rpcs3/Emu/Audio/AudioManager.h
@@ -17,7 +17,7 @@ struct AudioInfo
class AudioManager
{
AudioInfo m_audio_info;
- AudioThread* m_audio_out;
+ std::shared_ptr m_audio_out;
public:
AudioManager();
~AudioManager();
diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h
index 5b83cf7ca6..2f731afe3b 100644
--- a/rpcs3/Emu/System.h
+++ b/rpcs3/Emu/System.h
@@ -15,6 +15,7 @@ struct EmuCallbacks
std::function()> get_pad_handler;
std::function(frame_type)> get_gs_frame;
std::function()> get_gs_render;
+ std::function()> get_audio;
std::function()> get_msg_dialog;
std::function()> get_save_dialog;
};
diff --git a/rpcs3/OpenAL.vcxproj b/rpcs3/OpenAL.vcxproj
new file mode 100644
index 0000000000..e9cf287205
--- /dev/null
+++ b/rpcs3/OpenAL.vcxproj
@@ -0,0 +1,129 @@
+
+
+
+
+ Debug - LLVM
+ x64
+
+
+ Debug - MemLeak
+ x64
+
+
+ Debug
+ x64
+
+
+ Release - LLVM
+ x64
+
+
+ Release
+ x64
+
+
+
+ {30A05C4D-F5FD-421C-A864-17A64BDEAA75}
+ Win32Proj
+ OpenAL
+ 8.1
+
+
+
+ StaticLibrary
+ v140
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+
+ .\OpenAL\include;%(AdditionalIncludeDirectories)
+ true
+
+
+
+
+ .\OpenAL\include;%(AdditionalIncludeDirectories)
+ true
+
+
+
+
+ .\OpenAL\include;%(AdditionalIncludeDirectories)
+ true
+
+
+
+
+ .\OpenAL\include;%(AdditionalIncludeDirectories)
+ true
+
+
+
+
+ .\OpenAL\include;%(AdditionalIncludeDirectories)
+ true
+
+
+
+
+
+
+
+
+
+
+ {c4a10229-4712-4bd2-b63e-50d93c67a038}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rpcs3/OpenAL.vcxproj.filters b/rpcs3/OpenAL.vcxproj.filters
new file mode 100644
index 0000000000..84058485a2
--- /dev/null
+++ b/rpcs3/OpenAL.vcxproj.filters
@@ -0,0 +1,19 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ Source Files
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/rpcs3/XAudio.vcxproj b/rpcs3/XAudio.vcxproj
new file mode 100644
index 0000000000..3e2b6a28eb
--- /dev/null
+++ b/rpcs3/XAudio.vcxproj
@@ -0,0 +1,127 @@
+
+
+
+
+ Debug - LLVM
+ x64
+
+
+ Debug - MemLeak
+ x64
+
+
+ Debug
+ x64
+
+
+ Release - LLVM
+ x64
+
+
+ Release
+ x64
+
+
+
+ {78CB2F39-B809-4A06-8329-8C0A19119D3D}
+ XAudio
+ 8.1
+
+
+
+ StaticLibrary
+ Unicode
+ v140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+
+ ..\minidx9\Include;%(AdditionalIncludeDirectories)
+
+
+
+
+ ..\minidx9\Include;%(AdditionalIncludeDirectories)
+
+
+
+
+ ..\minidx9\Include;%(AdditionalIncludeDirectories)
+
+
+
+
+ ..\minidx9\Include;%(AdditionalIncludeDirectories)
+
+
+
+
+ ..\minidx9\Include;%(AdditionalIncludeDirectories)
+
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+ $(SolutionDir)lib\$(Configuration)-$(Platform)\
+ $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\
+
+
+
+ {c4a10229-4712-4bd2-b63e-50d93c67a038}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/rpcs3/XAudio.vcxproj.filters b/rpcs3/XAudio.vcxproj.filters
new file mode 100644
index 0000000000..6b96905421
--- /dev/null
+++ b/rpcs3/XAudio.vcxproj.filters
@@ -0,0 +1,19 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ Fichiers sources
+
+
+
+
+ Fichiers sources
+
+
+
\ No newline at end of file
diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj
index 1d2f5f1d6d..ddfa06f7bb 100644
--- a/rpcs3/emucore.vcxproj
+++ b/rpcs3/emucore.vcxproj
@@ -223,10 +223,8 @@
-
-
@@ -499,12 +497,10 @@
-
-
diff --git a/rpcs3/emucore.vcxproj.filters b/rpcs3/emucore.vcxproj.filters
index 8ae7833a65..30963300e8 100644
--- a/rpcs3/emucore.vcxproj.filters
+++ b/rpcs3/emucore.vcxproj.filters
@@ -39,9 +39,6 @@
{5a18e5b1-2632-4849-ba94-e7a2ea0b78fa}
-
- {f5d19014-3c8f-43d2-bb46-af3d7f4add2b}
-
{960c535f-dabe-4f7e-b73f-fb0fac60d7c0}
@@ -75,9 +72,6 @@
{1eae80f6-5aef-4049-81a0-bbfd7602f8f6}
-
- {1d6abf72-0f18-43ec-9351-1fed1a3d1a1e}
-
{2a8841dc-bce0-41bb-9fcb-5bf1f8dda213}
@@ -359,9 +353,6 @@
Emu\Audio
-
- Emu\Audio\AL
-
Emu\Memory
@@ -527,9 +518,6 @@
Utilities
-
- Emu\Audio\XAudio2
-
Emu\SysCalls\Modules
@@ -1256,9 +1244,6 @@
Emu\Audio
-
- Emu\Audio\AL
-
Emu\Memory
@@ -1469,9 +1454,6 @@
Emu\Audio
-
- Emu\Audio\XAudio2
-
Emu\SysCalls\Modules
diff --git a/rpcs3/rpcs3.cpp b/rpcs3/rpcs3.cpp
index 0ff4e3c848..ef79af2391 100644
--- a/rpcs3/rpcs3.cpp
+++ b/rpcs3/rpcs3.cpp
@@ -32,8 +32,11 @@
#include "Emu/RSX/Null/NullGSRender.h"
#include "Emu/RSX/GL/GLGSRender.h"
+#include "Emu/Audio/Null/NullAudioThread.h"
+#include "Emu/Audio/AL/OpenALThread.h"
#ifdef _MSC_VER
#include "Emu/RSX/D3D12/D3D12GSRender.h"
+#include "Emu/Audio/XAudio2/XAudio2Thread.h"
#endif
#ifdef _WIN32
@@ -144,6 +147,19 @@ bool Rpcs3App::OnInit()
}
};
+ callbacks.get_audio = []() -> std::shared_ptr
+ {
+ switch (rpcs3::state.config.audio.out.value())
+ {
+ default:
+ case audio_output_type::Null: return std::make_shared();
+ case audio_output_type::OpenAL: return std::make_shared();
+#ifdef _MSC_VER
+ case audio_output_type::XAudio2: return std::make_shared();
+#endif
+ }
+ };
+
callbacks.get_msg_dialog = []() -> std::shared_ptr
{
return std::make_shared();
diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj
index 9e3439594a..9ea6039805 100644
--- a/rpcs3/rpcs3.vcxproj
+++ b/rpcs3/rpcs3.vcxproj
@@ -107,6 +107,36 @@
false
+
+ ..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)
+
+
+ ..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)
+
+
+ ..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)
+
+
+ ..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)
+
+
+ ..\minidx9\Include;..\OpenAL\include;%(AdditionalIncludeDirectories)
+
+
+ ..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)
+
+
+ ..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)
+
+
+ ..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)
+
+
+ ..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)
+
+
+ ..\OpenAL\libs\Win64;%(AdditionalLibraryDirectories)
+
@@ -191,6 +221,12 @@
{3384223a-6d97-4799-9862-359f85312892}
+
+ {30a05c4d-f5fd-421c-a864-17a64bdeaa75}
+
+
+ {78cb2f39-b809-4a06-8329-8c0a19119d3d}
+
diff --git a/rpcs3_default.props b/rpcs3_default.props
index 85f925671c..e15c2e89c0 100644
--- a/rpcs3_default.props
+++ b/rpcs3_default.props
@@ -6,7 +6,7 @@
true
- .\;..\;..\asmjit\src\asmjit;..\wxWidgets\include\msvc;..\wxWidgets\include;.\OpenAL\include;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);..\llvm\include;..\llvm_build\include;$(UniversalCRT_IncludePath);..\minidx9\Include;..\minidx12\Include;..\glm
+ .\;..\;..\asmjit\src\asmjit;..\wxWidgets\include\msvc;..\wxWidgets\include;..\ffmpeg\WindowsInclude;..\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);..\llvm\include;..\llvm_build\include;$(UniversalCRT_IncludePath);..\minidx12\Include;..\glm
Level3
false
true
@@ -20,7 +20,7 @@
true
odbc32.lib;odbccp32.lib;comctl32.lib;ws2_32.lib;shlwapi.lib;winmm.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;%(AdditionalDependencies)
true
- ..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib;..\OpenAL\libs\Win64
+ ..\wxWidgets\lib\vc_x64_lib;..\ffmpeg\Windows\x86_64\lib
0x10000
false