diff --git a/.gitmodules b/.gitmodules index 543c009e56..c1a2b83f0e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,3 +17,6 @@ path = 3rdparty/wil url = https://github.com/microsoft/wil.git branch = master +[submodule "3rdparty/cubeb/cubeb"] + path = 3rdparty/cubeb/cubeb + url = https://github.com/mozilla/cubeb.git diff --git a/3rdparty/cubeb/CMakeLists.txt b/3rdparty/cubeb/CMakeLists.txt new file mode 100644 index 0000000000..cf767642a5 --- /dev/null +++ b/3rdparty/cubeb/CMakeLists.txt @@ -0,0 +1,10 @@ +# Disable building the stuff we don't need. +set(BUILD_SHARED_LIBS OFF) +set(BUILD_TESTS OFF) +set(BUILD_RUST_LIBS OFF) +set(BUILD_TOOLS OFF) +set(BUNDLE_SPEEX ON) +set(USE_SANITIZERS OFF) +set(LAZY_LOAD_LIBS ON) + +add_subdirectory(cubeb) diff --git a/3rdparty/cubeb/cubeb b/3rdparty/cubeb/cubeb new file mode 160000 index 0000000000..773f16b7ea --- /dev/null +++ b/3rdparty/cubeb/cubeb @@ -0,0 +1 @@ +Subproject commit 773f16b7ea308392c05be3e290163d1f636e6024 diff --git a/3rdparty/cubeb/cubeb.vcxproj b/3rdparty/cubeb/cubeb.vcxproj new file mode 100644 index 0000000000..133ef74a2b --- /dev/null +++ b/3rdparty/cubeb/cubeb.vcxproj @@ -0,0 +1,77 @@ + + + + + + {BF74C473-DC04-44B3-92E8-4145F4E77342} + Win32Proj + + + + StaticLibrary + $(DefaultPlatformToolset) + MultiByte + true + true + false + + + + + + + + + + + + + + AllRules.ruleset + + + + TurnOffAllWarnings + USE_WASAPI;USE_WINMM;OUTSIDE_SPEEX;FLOATING_POINT;RANDOM_PREFIX=speex;EXPORT=;%(PreprocessorDefinitions) + $(ProjectDir)include;$(ProjectDir)cubeb\include;$(ProjectDir)cubeb\src;$(ProjectDir)cubeb\subprojects;%(AdditionalIncludeDirectories) + stdcpp14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/3rdparty/cubeb/cubeb.vcxproj.filters b/3rdparty/cubeb/cubeb.vcxproj.filters new file mode 100644 index 0000000000..50a7761d75 --- /dev/null +++ b/3rdparty/cubeb/cubeb.vcxproj.filters @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + speex + + + speex + + + speex + + + speex + + + speex + + + speex + + + speex + + + + + + + {a22ed8dc-2384-4a96-bd3b-2370d6d7cd62} + + + + + + + + + + + + + speex + + + \ No newline at end of file diff --git a/3rdparty/cubeb/include/cubeb_export.h b/3rdparty/cubeb/include/cubeb_export.h new file mode 100644 index 0000000000..a049dacf71 --- /dev/null +++ b/3rdparty/cubeb/include/cubeb_export.h @@ -0,0 +1,25 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2020 PCSX2 Dev Team + * + * PCSX2 is free software: you can redistribute it and/or modify it under the terms + * of the GNU Lesser General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with PCSX2. + * If not, see . + */ + +#pragma once + +#define CUBEB_EXPORT +#define CUBEB_NO_EXPORT + +#ifdef WIN32 +#pragma comment(lib, "winmm.lib") +#pragma comment(lib, "avrt.lib") +#pragma comment(lib, "ksuser.lib") +#endif diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index b31b1a7554..a1ca1e10bd 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -47,6 +47,7 @@ option(DISABLE_PCSX2_WRAPPER "Disable including the PCSX2-linux.sh file") option(DISABLE_SETCAP "Do not set files capabilities") option(XDG_STD "Use XDG standard path instead of the standard PCSX2 path") option(PORTAUDIO_API "Build portaudio support on SPU2" ON) +option(CUBEB_API "Build Cubeb support on SPU2" ON) option(SDL2_API "Use SDL2 on SPU2 and PAD Linux (wxWidget mustn't be built with SDL1.2 support" ON) option(GTK2_API "Use GTK2 api (legacy)") diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 3677ba8520..cbe8670db3 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -268,3 +268,7 @@ else() endif() add_subdirectory(3rdparty/glad EXCLUDE_FROM_ALL) + +if(CUBEB_API) + add_subdirectory(3rdparty/cubeb EXCLUDE_FROM_ALL) +endif()