CocosDenshionTest, unload doesn't work for android 5.0.1 devices (#17662)

This commit is contained in:
James Chen 2017-04-10 10:14:47 +08:00 committed by minggo
parent e5e87311b6
commit 1f39fd5fdf
1 changed files with 8 additions and 0 deletions

View File

@ -271,6 +271,10 @@ void AndroidJavaEngine::preloadEffect(const char* filePath)
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "preloadEffect", fullPath);
}
else
{
AudioEngine::preload(filePath);
}
}
void AndroidJavaEngine::unloadEffect(const char* filePath)
@ -280,4 +284,8 @@ void AndroidJavaEngine::unloadEffect(const char* filePath)
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "unloadEffect", fullPath);
}
else
{
AudioEngine::uncache(filePath);
}
}