use fullpath to play background music

This commit is contained in:
minggo 2016-04-26 15:59:30 +08:00
parent 43a94c0693
commit bb4a54b042
1 changed files with 2 additions and 2 deletions

View File

@ -75,12 +75,12 @@ AndroidJavaEngine::~AndroidJavaEngine()
void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) {
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "preloadBackgroundMusic", filePath);
JniHelper::callStaticVoidMethod(helperClassName, "preloadBackgroundMusic", fullPath);
}
void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) {
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", filePath, loop);
JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", fullPath, loop);
}
void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) {