dep: Add soundtouch

This commit is contained in:
Connor McLaughlin
2022-07-27 01:39:58 +10:00
parent 97506a811e
commit f54e32ff01
36 changed files with 8055 additions and 19 deletions

View File

@ -0,0 +1,34 @@
if(MSVC)
set(COMPILE_DEFINITIONS /O2 /fp:fast)
set(COMPILE_OPTIONS )
else()
set(COMPILE_OPTIONS -Ofast)
endif()
add_library(soundtouch
source/SoundTouch/AAFilter.cpp
source/SoundTouch/BPMDetect.cpp
source/SoundTouch/cpu_detect_x86.cpp
source/SoundTouch/FIFOSampleBuffer.cpp
source/SoundTouch/FIRFilter.cpp
source/SoundTouch/InterpolateCubic.cpp
source/SoundTouch/InterpolateLinear.cpp
source/SoundTouch/InterpolateShannon.cpp
source/SoundTouch/mmx_optimized.cpp
source/SoundTouch/PeakFinder.cpp
source/SoundTouch/RateTransposer.cpp
source/SoundTouch/SoundTouch.cpp
source/SoundTouch/sse_optimized.cpp
source/SoundTouch/TDStretch.cpp
)
target_include_directories(soundtouch PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_definitions(soundtouch PRIVATE ${COMPILE_DEFINITIONS})
target_compile_options(soundtouch PRIVATE ${COMPILE_OPTIONS})
target_compile_definitions(soundtouch PRIVATE SOUNDTOUCH_FLOAT_SAMPLES)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*|armv8.*|aarch64.*)$")
target_compile_definitions(soundtouch PRIVATE SOUNDTOUCH_USE_NEON)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv7.*)$")
target_compile_options(soundtouch PRIVATE -mfpu=neon)
endif()
endif()