mirror of https://github.com/axmolengine/axmol.git
use fullpath to play background music
This commit is contained in:
parent
43a94c0693
commit
bb4a54b042
|
@ -75,12 +75,12 @@ AndroidJavaEngine::~AndroidJavaEngine()
|
||||||
|
|
||||||
void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) {
|
void AndroidJavaEngine::preloadBackgroundMusic(const char* filePath) {
|
||||||
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(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) {
|
void AndroidJavaEngine::playBackgroundMusic(const char* filePath, bool loop) {
|
||||||
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
|
std::string fullPath = CocosDenshion::android::getFullPathWithoutAssetsPrefix(filePath);
|
||||||
JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", filePath, loop);
|
JniHelper::callStaticVoidMethod(helperClassName, "playBackgroundMusic", fullPath, loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) {
|
void AndroidJavaEngine::stopBackgroundMusic(bool releaseData) {
|
||||||
|
|
Loading…
Reference in New Issue