Add missing detect macro CC_USE_ALSOFT_ON_APPLE on apple platform

This commit is contained in:
halx99 2020-07-31 16:36:45 +08:00
parent d7858db30d
commit 2163f9c440
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ private:
void _updateLocked(float dt);
void _play2d(AudioCache *cache, AUDIO_ID audioID);
ALuint findValidSource();
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) && !CC_USE_ALSOFT_ON_APPLE
static ALvoid myAlSourceNotificationCallback(ALuint sid, ALuint notificationID, ALvoid* userData);
#endif
ALuint _alSources[MAX_AUDIOINSTANCES];

View File

@ -60,7 +60,7 @@ protected:
void setCache(AudioCache* cache);
void rotateBufferThread(int offsetFrame);
bool play2d();
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) && !CC_USE_ALSOFT_ON_APPLE
void wakeupRotateThread();
#endif
@ -84,7 +84,7 @@ protected:
std::mutex _sleepMutex;
bool _timeDirty;
bool _isRotateThreadExited;
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) && !CC_USE_ALSOFT_ON_APPLE
std::atomic_bool _needWakeupRotateThread;
#endif