2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS
|
|
|
|
AudioCommon.cpp
|
|
|
|
DPL2Decoder.cpp
|
|
|
|
Mixer.cpp
|
|
|
|
WaveFile.cpp
|
|
|
|
NullSoundStream.cpp
|
|
|
|
)
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2010-11-03 04:13:36 +00:00
|
|
|
set(LIBS "")
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2017-02-03 23:55:29 +00:00
|
|
|
find_package(OpenSLES)
|
2016-02-05 16:54:59 +00:00
|
|
|
if(OPENSLES_FOUND)
|
2017-02-04 23:18:59 +00:00
|
|
|
message(STATUS "OpenSLES found, enabling OpenSLES sound backend")
|
|
|
|
set(SRCS ${SRCS} OpenSLESStream.cpp)
|
|
|
|
set(LIBS ${LIBS} OpenSLES::OpenSLES)
|
2017-01-25 05:25:52 +00:00
|
|
|
endif()
|
2013-02-26 19:49:00 +00:00
|
|
|
|
2011-12-05 04:49:08 +00:00
|
|
|
if(ALSA_FOUND)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} AlsaSoundStream.cpp)
|
|
|
|
set(LIBS ${LIBS} ${ALSA_LIBRARIES})
|
2017-01-25 05:25:52 +00:00
|
|
|
endif()
|
2011-12-05 04:49:08 +00:00
|
|
|
|
|
|
|
if(AO_FOUND)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} AOSoundStream.cpp)
|
|
|
|
set(LIBS ${LIBS} ${AO_LIBRARIES})
|
2017-01-25 05:25:52 +00:00
|
|
|
endif()
|
2011-12-05 04:49:08 +00:00
|
|
|
|
|
|
|
if(OPENAL_FOUND)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} OpenALStream.cpp aldlist.cpp)
|
|
|
|
set(LIBS ${LIBS} ${OPENAL_LIBRARY} SoundTouch )
|
2017-01-25 05:25:52 +00:00
|
|
|
endif()
|
2011-12-05 04:49:08 +00:00
|
|
|
|
|
|
|
if(PULSEAUDIO_FOUND)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} PulseAudioStream.cpp)
|
|
|
|
set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES})
|
2017-01-25 05:25:52 +00:00
|
|
|
endif()
|
2011-12-05 04:49:08 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} XAudio2Stream.cpp)
|
2017-01-20 21:56:15 +00:00
|
|
|
|
2017-02-04 23:18:59 +00:00
|
|
|
add_dolphin_library(audiocommon_xaudio27 "XAudio2_7Stream.cpp" "${LIBS}")
|
|
|
|
target_include_directories(audiocommon_xaudio27 PRIVATE
|
|
|
|
${PROJECT_SOURCE_DIR}/Externals
|
|
|
|
${PROJECT_SOURCE_DIR}/Externals/XAudio2_7
|
|
|
|
)
|
|
|
|
list(APPEND LIBS audiocommon_xaudio27)
|
2017-01-20 21:56:15 +00:00
|
|
|
|
2015-01-03 12:17:57 +00:00
|
|
|
elseif(APPLE)
|
2017-02-04 23:18:59 +00:00
|
|
|
set(SRCS ${SRCS} CoreAudioSoundStream.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
endif()
|
|
|
|
|
2017-01-20 21:56:15 +00:00
|
|
|
|
2013-10-17 04:06:34 +00:00
|
|
|
add_dolphin_library(audiocommon "${SRCS}" "${LIBS}")
|