dep/soundtouch: Export main class on Android

This commit is contained in:
Connor McLaughlin 2022-08-22 19:31:46 +10:00
parent c7e8233b7b
commit 4c2906fb72
2 changed files with 14 additions and 2 deletions

View file

@ -5,7 +5,14 @@ else()
set(COMPILE_OPTIONS -Ofast) set(COMPILE_OPTIONS -Ofast)
endif() endif()
add_library(soundtouch if(NOT ANDROID)
add_library(soundtouch STATIC)
else()
add_library(soundtouch SHARED)
set(COMPILE_DEFINITIONS "${COMPILE_DEFINITIONS}" "ST_EXPORT")
endif()
target_sources(soundtouch PRIVATE
source/SoundTouch/AAFilter.cpp source/SoundTouch/AAFilter.cpp
source/SoundTouch/BPMDetect.cpp source/SoundTouch/BPMDetect.cpp
source/SoundTouch/cpu_detect_x86.cpp source/SoundTouch/cpu_detect_x86.cpp

View file

@ -164,8 +164,13 @@ namespace soundtouch
/// tempo/pitch/rate/samplerate settings. /// tempo/pitch/rate/samplerate settings.
#define SETTING_INITIAL_LATENCY 8 #define SETTING_INITIAL_LATENCY 8
#ifdef ST_EXPORT
#define ST_VISIBILITY __attribute__ ((visibility ("default")))
#else
#define ST_VISIBILITY
#endif
class SoundTouch : public FIFOProcessor class ST_VISIBILITY SoundTouch : public FIFOProcessor
{ {
private: private:
/// Rate transposer class instance /// Rate transposer class instance