diff --git a/CocosDenshion/win32/SimpleAudioEngine.cpp b/CocosDenshion/win32/SimpleAudioEngine.cpp index cc38d43227..870bd15029 100644 --- a/CocosDenshion/win32/SimpleAudioEngine.cpp +++ b/CocosDenshion/win32/SimpleAudioEngine.cpp @@ -74,7 +74,7 @@ void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop) { return; } - + sharedMusic().Open(_FullPath(pszFilePath).c_str(), _Hash(pszFilePath)); sharedMusic().Play((bLoop) ? -1 : 1); } @@ -161,6 +161,7 @@ void SimpleAudioEngine::preloadEffect(const char* pszFilePath) BREAK_IF(nRet == pPlayer->GetSoundID()); + delete pPlayer; sharedList().erase(nRet); nRet = 0; } while (0);