From c8f85a4a95d2c5af077543ed249ada65c826dece Mon Sep 17 00:00:00 2001 From: halx99 Date: Sun, 24 Nov 2019 15:07:48 +0800 Subject: [PATCH] Refactor AudioEngine, fix compile issue. --- cocos/audio/AudioEngine.cpp | 2 +- cocos/audio/AudioEngineImpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/audio/AudioEngine.cpp b/cocos/audio/AudioEngine.cpp index cb81c9c8f0..c3b577df04 100644 --- a/cocos/audio/AudioEngine.cpp +++ b/cocos/audio/AudioEngine.cpp @@ -338,7 +338,7 @@ void AudioEngine::remove(AUDIO_ID audioID) if (it->second.profileHelper) { it->second.profileHelper->audioIDs.remove(audioID); } - _audioPathIDMap[*it->second.filePath].remove(audioID); + _audioPathIDMap[it->second.filePath].remove(audioID); _audioIDInfoMap.erase(audioID); } } diff --git a/cocos/audio/AudioEngineImpl.cpp b/cocos/audio/AudioEngineImpl.cpp index 808b4d91a7..eed6d5ee07 100644 --- a/cocos/audio/AudioEngineImpl.cpp +++ b/cocos/audio/AudioEngineImpl.cpp @@ -416,7 +416,7 @@ void AudioEngineImpl::update(float dt) std::string filePath; if (player->_finishCallbak) { auto& audioInfo = AudioEngine::_audioIDInfoMap[audioID]; - filePath = *audioInfo.filePath; + filePath = audioInfo.filePath; } AudioEngine::remove(audioID);