2014-09-17 11:23:59 +08:00
|
|
|
|
2014-11-10 21:33:43 +08:00
|
|
|
set(COCOS_AUDIO_SRC
|
|
|
|
audio/AudioEngine.cpp
|
2018-03-14 13:51:29 +08:00
|
|
|
)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
|
|
|
if(WINDOWS)
|
2018-03-14 13:51:29 +08:00
|
|
|
|
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
audio/win32/AudioDecoderManager.h
|
|
|
|
audio/win32/AudioDecoder.h
|
|
|
|
audio/win32/MciPlayer.h
|
|
|
|
audio/win32/AudioPlayer.h
|
|
|
|
audio/win32/AudioDecoderOgg.h
|
|
|
|
audio/win32/AudioMacros.h
|
|
|
|
audio/win32/AudioEngine-win32.h
|
|
|
|
audio/win32/AudioDecoderMp3.h
|
|
|
|
audio/win32/AudioCache.h
|
|
|
|
)
|
|
|
|
|
2014-11-10 21:33:43 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
|
|
|
audio/win32/SimpleAudioEngine.cpp
|
|
|
|
audio/win32/MciPlayer.cpp
|
2014-11-17 06:42:04 +08:00
|
|
|
audio/win32/MciPlayer.h
|
|
|
|
audio/win32/AudioEngine-win32.cpp
|
|
|
|
audio/win32/AudioCache.cpp
|
|
|
|
audio/win32/AudioPlayer.cpp
|
2017-02-23 16:13:26 +08:00
|
|
|
audio/win32/AudioDecoder.cpp
|
|
|
|
audio/win32/AudioDecoderManager.cpp
|
|
|
|
audio/win32/AudioDecoderMp3.cpp
|
|
|
|
audio/win32/AudioDecoderOgg.cpp
|
2014-11-10 21:33:43 +08:00
|
|
|
)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
2018-02-08 09:24:33 +08:00
|
|
|
elseif(ANDROID)
|
2018-03-14 13:51:29 +08:00
|
|
|
|
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
audio/android/PcmAudioService.h
|
|
|
|
audio/android/AudioBufferProvider.h
|
|
|
|
audio/android/IAudioPlayer.h
|
|
|
|
audio/android/AudioResampler.h
|
|
|
|
audio/android/AudioDecoder.h
|
|
|
|
audio/android/AudioResamplerPublic.h
|
|
|
|
audio/android/AudioMixer.h
|
|
|
|
audio/android/tinysndfile.h
|
|
|
|
audio/android/mp3reader.h
|
|
|
|
audio/android/AudioMixerOps.h
|
|
|
|
audio/android/cutils/bitops.h
|
|
|
|
audio/android/cutils/log.h
|
|
|
|
audio/android/audio.h
|
|
|
|
audio/android/AudioPlayerProvider.h
|
|
|
|
audio/android/utils/Utils.h
|
|
|
|
audio/android/utils/Errors.h
|
|
|
|
audio/android/utils/Compat.h
|
|
|
|
audio/android/ccdandroidUtils.h
|
|
|
|
audio/android/AudioDecoderOgg.h
|
|
|
|
audio/android/Track.h
|
|
|
|
audio/android/OpenSLHelper.h
|
|
|
|
audio/android/PcmAudioPlayer.h
|
|
|
|
audio/android/AssetFd.h
|
|
|
|
audio/android/PcmBufferProvider.h
|
|
|
|
audio/android/CCThreadPool.h
|
|
|
|
audio/android/audio_utils/include/audio_utils/minifloat.h
|
|
|
|
audio/android/audio_utils/include/audio_utils/primitives.h
|
|
|
|
audio/android/audio_utils/include/audio_utils/format.h
|
|
|
|
audio/android/audio_utils/private/private.h
|
|
|
|
audio/android/ICallerThreadUtils.h
|
|
|
|
audio/android/AudioDecoderWav.h
|
|
|
|
audio/android/AudioDecoderProvider.h
|
|
|
|
audio/android/UrlAudioPlayer.h
|
|
|
|
audio/android/AudioDecoderSLES.h
|
|
|
|
audio/android/AudioDecoderMp3.h
|
|
|
|
audio/android/PcmData.h
|
|
|
|
audio/android/jni/cddandroidAndroidJavaEngine.h
|
|
|
|
audio/android/AudioMixerController.h
|
|
|
|
audio/android/AudioResamplerCubic.h
|
|
|
|
audio/android/AudioEngine-inl.h
|
|
|
|
audio/android/IVolumeProvider.h
|
|
|
|
|
|
|
|
)
|
|
|
|
|
2016-03-03 08:51:54 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
2018-02-08 09:24:33 +08:00
|
|
|
audio/android/cddSimpleAudioEngine.cpp
|
|
|
|
audio/android/ccdandroidUtils.cpp
|
|
|
|
audio/android/jni/cddandroidAndroidJavaEngine.cpp
|
|
|
|
audio/android/AudioEngine-inl.cpp
|
|
|
|
audio/android/CCThreadPool.cpp
|
|
|
|
audio/android/AssetFd.cpp
|
|
|
|
audio/android/AudioDecoder.cpp
|
|
|
|
audio/android/AudioDecoderProvider.cpp
|
|
|
|
audio/android/AudioDecoderSLES.cpp
|
|
|
|
audio/android/AudioDecoderOgg.cpp
|
|
|
|
audio/android/AudioDecoderMp3.cpp
|
|
|
|
audio/android/AudioDecoderWav.cpp
|
|
|
|
audio/android/AudioPlayerProvider.cpp
|
|
|
|
audio/android/AudioResampler.cpp
|
|
|
|
audio/android/AudioResamplerCubic.cpp
|
|
|
|
audio/android/PcmBufferProvider.cpp
|
|
|
|
audio/android/PcmAudioPlayer.cpp
|
|
|
|
audio/android/UrlAudioPlayer.cpp
|
|
|
|
audio/android/PcmData.cpp
|
|
|
|
audio/android/AudioMixerController.cpp
|
|
|
|
audio/android/AudioMixer.cpp
|
|
|
|
audio/android/PcmAudioService.cpp
|
|
|
|
audio/android/Track.cpp
|
|
|
|
audio/android/audio_utils/format.c
|
|
|
|
audio/android/audio_utils/minifloat.cpp
|
|
|
|
audio/android/audio_utils/primitives.c
|
|
|
|
audio/android/utils/Utils.cpp
|
|
|
|
audio/android/mp3reader.cpp
|
|
|
|
audio/android/tinysndfile.cpp
|
2016-03-03 08:51:54 +08:00
|
|
|
)
|
|
|
|
|
2014-09-17 11:23:59 +08:00
|
|
|
elseif(LINUX)
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
audio/linux/AudioEngine-linux.h
|
|
|
|
)
|
|
|
|
|
2014-11-10 21:33:43 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
2015-11-25 09:54:12 +08:00
|
|
|
audio/linux/SimpleAudioEngine.cpp
|
|
|
|
audio/linux/AudioEngine-linux.h
|
|
|
|
audio/linux/AudioEngine-linux.cpp
|
2014-11-10 21:33:43 +08:00
|
|
|
)
|
2014-09-17 11:23:59 +08:00
|
|
|
|
2018-02-08 09:24:33 +08:00
|
|
|
elseif(APPLE)
|
|
|
|
# common
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
audio/apple/AudioDecoder.h
|
|
|
|
audio/apple/AudioPlayer.h
|
|
|
|
audio/apple/AudioMacros.h
|
|
|
|
audio/apple/AudioCache.h
|
|
|
|
audio/apple/AudioEngine-inl.h
|
|
|
|
)
|
2014-11-10 21:33:43 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
|
|
|
audio/apple/AudioCache.mm
|
2017-02-04 09:46:32 +08:00
|
|
|
audio/apple/AudioDecoder.mm
|
2014-11-10 21:33:43 +08:00
|
|
|
audio/apple/AudioEngine-inl.mm
|
|
|
|
audio/apple/AudioPlayer.mm
|
|
|
|
)
|
2018-02-08 09:24:33 +08:00
|
|
|
# split it in _C and non C
|
|
|
|
# because C files needs to be compiled with C compiler and not C++
|
|
|
|
# compiler
|
|
|
|
if(MACOSX)
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
${COCOS_AUDIO_PLATFORM_HEADER}
|
|
|
|
audio/mac/CDConfig.h
|
|
|
|
audio/mac/SimpleAudioEngine_objc.h
|
|
|
|
audio/mac/CDOpenALSupport.h
|
|
|
|
audio/mac/CDXMacOSXSupport.h
|
|
|
|
audio/mac/CDAudioManager.h
|
|
|
|
audio/mac/CocosDenshion.h
|
|
|
|
)
|
2018-02-08 09:24:33 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC_C
|
|
|
|
audio/mac/CDAudioManager.m
|
|
|
|
audio/mac/CDOpenALSupport.m
|
|
|
|
audio/mac/CocosDenshion.m
|
|
|
|
audio/mac/SimpleAudioEngine_objc.m
|
|
|
|
)
|
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
|
|
|
${COCOS_AUDIO_PLATFORM_SRC_C}
|
|
|
|
${COCOS_AUDIO_PLATFORM_SRC}
|
|
|
|
audio/mac/SimpleAudioEngine.mm
|
|
|
|
audio/mac/CDXMacOSXSupport.mm
|
|
|
|
)
|
|
|
|
elseif(IOS)
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_HEADER
|
|
|
|
${COCOS_AUDIO_PLATFORM_HEADER}
|
|
|
|
audio/ios/CDConfig.h
|
|
|
|
audio/ios/SimpleAudioEngine_objc.h
|
|
|
|
audio/ios/CDOpenALSupport.h
|
|
|
|
audio/ios/CDAudioManager.h
|
|
|
|
audio/ios/CocosDenshion.h
|
|
|
|
)
|
2018-02-08 09:24:33 +08:00
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC_C
|
|
|
|
audio/ios/CDAudioManager.m
|
|
|
|
audio/ios/CDOpenALSupport.m
|
|
|
|
audio/ios/CocosDenshion.m
|
|
|
|
audio/ios/SimpleAudioEngine_objc.m
|
|
|
|
)
|
|
|
|
set(COCOS_AUDIO_PLATFORM_SRC
|
|
|
|
${COCOS_AUDIO_PLATFORM_SRC_C}
|
|
|
|
${COCOS_AUDIO_PLATFORM_SRC}
|
|
|
|
audio/ios/SimpleAudioEngine.mm
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-11-10 21:33:43 +08:00
|
|
|
set_source_files_properties(
|
|
|
|
${COCOS_AUDIO_PLATFORM_SRC_C}
|
2014-09-17 11:23:59 +08:00
|
|
|
PROPERTIES LANGUAGE C
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-03-14 13:51:29 +08:00
|
|
|
set(COCOS_AUDIO_HEADER ${COCOS_AUDIO_PLATFORM_HEADER})
|
2014-11-10 21:33:43 +08:00
|
|
|
list(APPEND COCOS_AUDIO_SRC ${COCOS_AUDIO_PLATFORM_SRC})
|