2017-02-05 00:18:59 +01:00
|
|
|
set(SRCS
|
|
|
|
AudioCommon.cpp
|
|
|
|
DPL2Decoder.cpp
|
|
|
|
Mixer.cpp
|
|
|
|
WaveFile.cpp
|
|
|
|
NullSoundStream.cpp
|
|
|
|
)
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2017-02-05 00:33:53 +01:00
|
|
|
add_dolphin_library(audiocommon "${SRCS}" "")
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2017-02-04 00:55:29 +01:00
|
|
|
find_package(OpenSLES)
|
2016-02-05 10:54:59 -06:00
|
|
|
if(OPENSLES_FOUND)
|
2017-02-05 00:18:59 +01:00
|
|
|
message(STATUS "OpenSLES found, enabling OpenSLES sound backend")
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE OpenSLESStream.cpp)
|
|
|
|
target_link_libraries(audiocommon PRIVATE OpenSLES::OpenSLES)
|
2017-01-25 06:25:52 +01:00
|
|
|
endif()
|
2013-02-26 13:49:00 -06:00
|
|
|
|
2011-12-05 05:49:08 +01:00
|
|
|
if(ALSA_FOUND)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE AlsaSoundStream.cpp)
|
|
|
|
target_link_libraries(audiocommon PRIVATE ${ALSA_LIBRARIES})
|
2017-01-25 06:25:52 +01:00
|
|
|
endif()
|
2011-12-05 05:49:08 +01:00
|
|
|
|
|
|
|
if(AO_FOUND)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE AOSoundStream.cpp)
|
|
|
|
target_link_libraries(audiocommon PRIVATE ${AO_LIBRARIES})
|
2017-01-25 06:25:52 +01:00
|
|
|
endif()
|
2011-12-05 05:49:08 +01:00
|
|
|
|
|
|
|
if(OPENAL_FOUND)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE OpenALStream.cpp aldlist.cpp)
|
|
|
|
target_link_libraries(audiocommon PRIVATE ${OPENAL_LIBRARY} SoundTouch)
|
2017-01-25 06:25:52 +01:00
|
|
|
endif()
|
2011-12-05 05:49:08 +01:00
|
|
|
|
|
|
|
if(PULSEAUDIO_FOUND)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE PulseAudioStream.cpp)
|
|
|
|
target_link_libraries(audiocommon PRIVATE ${PULSEAUDIO_LIBRARIES})
|
2017-01-25 06:25:52 +01:00
|
|
|
endif()
|
2011-12-05 05:49:08 +01:00
|
|
|
|
|
|
|
if(WIN32)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE XAudio2Stream.cpp)
|
2017-01-20 22:56:15 +01:00
|
|
|
|
2017-02-05 00:18:59 +01: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
|
|
|
|
)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_link_libraries(audiocommon PRIVATE audiocommon_xaudio27)
|
2017-01-20 22:56:15 +01:00
|
|
|
|
2015-01-03 13:17:57 +01:00
|
|
|
elseif(APPLE)
|
2017-02-05 00:33:53 +01:00
|
|
|
target_sources(audiocommon PRIVATE CoreAudioSoundStream.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
endif()
|
|
|
|
|
2017-01-20 22:56:15 +01:00
|
|
|
|