From d401cbfd752f57ff2136781b6323f4585bb8e89a Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 5 Sep 2020 22:33:18 +0800 Subject: [PATCH] fix mac compile error --- cocos/audio/src/AudioDecoderManager.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/audio/src/AudioDecoderManager.cpp b/cocos/audio/src/AudioDecoderManager.cpp index 9ed0477b18..e95f00e05d 100644 --- a/cocos/audio/src/AudioDecoderManager.cpp +++ b/cocos/audio/src/AudioDecoderManager.cpp @@ -32,7 +32,7 @@ THE SOFTWARE. #include "platform/CCFileUtils.h" #include "base/CCConsole.h" -#if CC_TARGET_PLATFORM != CC_PLATFORM_IOS +#if !defined(__APPLE__) #include "audio/include/AudioDecoderMp3.h" #include "audio/include/AudioDecoderWav.h" #else @@ -45,7 +45,7 @@ namespace cocos2d { bool AudioDecoderManager::init() { -#if CC_TARGET_PLATFORM != CC_PLATFORM_IOS +#if !defined(__APPLE__) AudioDecoderMp3::lazyInit(); #endif return true; @@ -53,7 +53,7 @@ bool AudioDecoderManager::init() void AudioDecoderManager::destroy() { -#if CC_TARGET_PLATFORM != CC_PLATFORM_IOS +#if !defined(__APPLE__) AudioDecoderMp3::destroy(); #endif } @@ -65,7 +65,7 @@ AudioDecoder* AudioDecoderManager::createDecoder(const std::string& path) { return new (std::nothrow) AudioDecoderOgg(); } -#if CC_TARGET_PLATFORM != CC_PLATFORM_IOS +#if !defined(__APPLE__) else if (cxx20::ic::ends_with(svPath, ".mp3")) { return new (std::nothrow) AudioDecoderMp3();