fix mac compile error

This commit is contained in:
halx99 2020-09-05 22:33:18 +08:00
parent 2d5fb7f77d
commit d401cbfd75
1 changed files with 4 additions and 4 deletions

View File

@ -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();