Fix include paths and compiling in Linux. Externals soundtouch is 1.7.1, while Ubuntu 12.10 is 1.6.x. Externals soundtouch is compiled with integer samples, while ubuntu is compiled with float samples. Float samples is probably the more common route. If you're going to use soundtouch, you should probably use SAMPLETYPE instead of explicitly choosing short. This probably breaks the windows build since its includes aren't setup.
This commit is contained in:
parent
7600cf106b
commit
01f4d9f386
|
@ -405,6 +405,19 @@ else()
|
|||
set(LZO lzo2)
|
||||
endif()
|
||||
|
||||
if(OPENAL_FOUND)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(SOUNDTOUCH SoundTouch soundtouch/soundtouch.h QUIET)
|
||||
endif()
|
||||
if (SOUNDTOUCH_FOUND)
|
||||
message("Using shared soundtouch")
|
||||
else()
|
||||
message("Using static soundtouch from Externals")
|
||||
add_subdirectory(Externals/soundtouch)
|
||||
include_directories(Externals/soundtouch)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL2 OPTIONAL)
|
||||
endif()
|
||||
|
@ -452,17 +465,6 @@ else()
|
|||
include_directories(Externals/SOIL)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(SoundTouch SoundTouch SoundTouch.h QUIET)
|
||||
endif()
|
||||
if(SOUNDTOUCH_FOUND)
|
||||
message("Using shared SoundTouch")
|
||||
else()
|
||||
message("Using static SoundTouch from Externals")
|
||||
add_subdirectory(Externals/SoundTouch)
|
||||
include_directories(Externals/SoundTouch)
|
||||
endif()
|
||||
|
||||
# If zlib has already been found on a previous run of cmake don't check again
|
||||
# as the check seems to take a long time.
|
||||
if(NOT ZLIB_FOUND)
|
||||
|
|
|
@ -18,7 +18,7 @@ endif(AO_FOUND)
|
|||
|
||||
if(OPENAL_FOUND)
|
||||
set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp)
|
||||
set(LIBS ${LIBS} ${OPENAL_LIBRARY})
|
||||
set(LIBS ${LIBS} ${OPENAL_LIBRARY} SoundTouch )
|
||||
endif(OPENAL_FOUND)
|
||||
|
||||
if(PULSEAUDIO_FOUND)
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||
|
||||
using namespace soundtouch;
|
||||
SoundTouch soundTouch;
|
||||
soundtouch::SoundTouch soundTouch;
|
||||
|
||||
//
|
||||
// AyuanX: Spec says OpenAL1.1 is thread safe already
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
#include "../../Core/Src/Core.h"
|
||||
#include "../../Core/Src/HW/SystemTimers.h"
|
||||
#include "../../Core/Src/HW/AudioInterface.h"
|
||||
#include "../../../../Externals/SoundTouch/STTypes.h"
|
||||
#include "../../../../Externals/SoundTouch/SoundTouch.h"
|
||||
#include "Core.h"
|
||||
#include "HW/SystemTimers.h"
|
||||
#include "HW/AudioInterface.h"
|
||||
#include <soundtouch/SoundTouch.h>
|
||||
#include <soundtouch/STTypes.h>
|
||||
|
||||
// 16 bit Stereo
|
||||
#define SFX_MAX_SOURCE 1
|
||||
|
|
Loading…
Reference in New Issue