- Created a new SIMD interface header and source files for audio processing functions. - Implemented functions for filling buffers, mixing audio, applying gain, calculating RMS and peak values, normalizing audio, converting stereo to mono, limiting audio, fading audio, and a simple equalizer. - Added SSE-specific implementations for the audio processing functions to leverage SIMD for performance improvements. - Updated CMakeLists.txt files to include new libraries and link dependencies for the SIMD interface and SSE implementations. - Introduced a static test helper library for unit testing with Google Test framework.
53 lines
1.4 KiB
CMake
53 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(AudioBackend
|
|
VERSION 1.0.0
|
|
DESCRIPTION "具有插件沙箱功能的跨平台 C++23 音频后端系统"
|
|
LANGUAGES CXX C
|
|
)
|
|
|
|
include(cmake/retrieve_files.cmake)
|
|
include(cmake/project_cpp_standard.cmake)
|
|
include(cmake/config_macos.cmake)
|
|
include(cmake/mirage_utils.cmake)
|
|
include(cmake/detect_os.cmake)
|
|
include(cmake/compiler_options.cmake)
|
|
include(cmake/mingw_dll.cmake)
|
|
|
|
configure_project_defaults()
|
|
setup_project_options(
|
|
STANDARD 20
|
|
INTERFACE_TARGET audio_backend_project_options
|
|
)
|
|
|
|
message(STATUS "")
|
|
message(STATUS "========================================")
|
|
message(STATUS " ${PROJECT_NAME} v${PROJECT_VERSION}")
|
|
message(STATUS "========================================")
|
|
message(STATUS "C++ 标准: C++${CMAKE_CXX_STANDARD}")
|
|
message(STATUS "构建系统: CMake ${CMAKE_VERSION}")
|
|
message(STATUS "编译器: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
|
message(STATUS "操作系统: ${CMAKE_SYSTEM_NAME}")
|
|
message(STATUS "架构: ${CMAKE_SYSTEM_PROCESSOR}")
|
|
|
|
if (WIN32)
|
|
add_compile_definitions(
|
|
NOMINMAX
|
|
WIN32_LEAN_AND_MEAN
|
|
_CRT_SECURE_NO_WARNINGS
|
|
_WIN32_WINNT=0x0A00
|
|
)
|
|
endif ()
|
|
|
|
add_subdirectory(src/proto)
|
|
add_subdirectory(src/misc)
|
|
add_subdirectory(src/network)
|
|
add_subdirectory(src/simd)
|
|
add_subdirectory(src/process_manager)
|
|
add_subdirectory(src/host_sandbox)
|
|
add_subdirectory(src/engine)
|
|
# 启用测试支持
|
|
enable_testing()
|
|
|
|
add_subdirectory(tests)
|