From 6d51d95d447625b9e473db5f6c959c1a809ae446 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Thu, 6 Dec 2018 07:14:54 -0500 Subject: [PATCH] audio_core: add teakra and lle interface --- .gitmodules | 15 +++++++++------ externals/CMakeLists.txt | 3 +++ externals/teakra | 1 + src/audio_core/CMakeLists.txt | 5 +++-- src/audio_core/lle/lle.cpp | 17 +++++++++++++++++ src/audio_core/lle/lle.h | 22 ++++++++++++++++++++++ 6 files changed, 55 insertions(+), 8 deletions(-) create mode 160000 externals/teakra create mode 100644 src/audio_core/lle/lle.cpp create mode 100644 src/audio_core/lle/lle.h diff --git a/.gitmodules b/.gitmodules index b7f41e5f6..b0e5a858c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,11 +38,14 @@ path = externals/discord-rpc url = https://github.com/discordapp/discord-rpc.git [submodule "externals/libzmq"] - path = externals/libzmq - url = https://github.com/zeromq/libzmq + path = externals/libzmq + url = https://github.com/zeromq/libzmq [submodule "externals/cppzmq"] - path = externals/cppzmq - url = https://github.com/zeromq/cppzmq + path = externals/cppzmq + url = https://github.com/zeromq/cppzmq [submodule "cpp-jwt"] - path = externals/cpp-jwt - url = https://github.com/arun11299/cpp-jwt.git + path = externals/cpp-jwt + url = https://github.com/arun11299/cpp-jwt.git +[submodule "teakra"] + path = externals/teakra + url = https://github.com/wwylele/teakra.git diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index b96bebb7f..55bf4f8c4 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -51,6 +51,9 @@ add_subdirectory(soundtouch) # The SoundTouch target doesn't export the necessary include paths as properties by default target_include_directories(SoundTouch INTERFACE ./soundtouch/include) +# Teakra +add_subdirectory(teakra) + # Xbyak if (ARCHITECTURE_x86_64) # Defined before "dynarmic" above diff --git a/externals/teakra b/externals/teakra new file mode 160000 index 000000000..6dc129754 --- /dev/null +++ b/externals/teakra @@ -0,0 +1 @@ +Subproject commit 6dc1297548a116e6ef78ddd1a52ab3b3f9af0b17 diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index de6079edc..538cfd894 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt @@ -14,6 +14,8 @@ add_library(audio_core STATIC hle/shared_memory.h hle/source.cpp hle/source.h + lle/lle.cpp + lle/lle.h interpolate.cpp interpolate.h null_sink.h @@ -30,7 +32,7 @@ add_library(audio_core STATIC create_target_directory_groups(audio_core) target_link_libraries(audio_core PUBLIC common core) -target_link_libraries(audio_core PRIVATE SoundTouch) +target_link_libraries(audio_core PRIVATE SoundTouch teakra) if(SDL2_FOUND) target_link_libraries(audio_core PRIVATE SDL2) @@ -41,4 +43,3 @@ if(ENABLE_CUBEB) target_link_libraries(audio_core PRIVATE cubeb) add_definitions(-DHAVE_CUBEB=1) endif() - diff --git a/src/audio_core/lle/lle.cpp b/src/audio_core/lle/lle.cpp new file mode 100644 index 000000000..7ac26e921 --- /dev/null +++ b/src/audio_core/lle/lle.cpp @@ -0,0 +1,17 @@ +// Copyright 2018 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "audio_core/lle/lle.h" +#include "teakra/teakra.h" + +namespace AudioCore { + +struct DspLle::Impl final { + Teakra::Teakra teakra; +}; + +DspLle::DspLle() : impl(std::make_unique()) {} +DspLle::~DspLle() = default; + +} // namespace AudioCore diff --git a/src/audio_core/lle/lle.h b/src/audio_core/lle/lle.h new file mode 100644 index 000000000..d92ff88f6 --- /dev/null +++ b/src/audio_core/lle/lle.h @@ -0,0 +1,22 @@ +// Copyright 2018 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "audio_core/dsp_interface.h" + +namespace AudioCore { + +class DspLle final : public DspInterface { +public: + DspLle(); + ~DspLle(); + +private: + struct Impl; + friend struct Impl; + std::unique_ptr impl; +}; + +} // namespace AudioCore