mirror of https://github.com/axmolengine/axmol.git
Fixed incorrect file path of audio resource in AudioEngine on Android.
This commit is contained in:
parent
8993e490e6
commit
c66348435c
|
@ -217,7 +217,7 @@ bool AudioEngineImpl::init()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AudioEngineImpl::play2d(const std::string &fileFullPath ,bool loop ,float volume)
|
int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume)
|
||||||
{
|
{
|
||||||
auto audioId = AudioEngine::INVAILD_AUDIO_ID;
|
auto audioId = AudioEngine::INVAILD_AUDIO_ID;
|
||||||
|
|
||||||
|
@ -227,10 +227,10 @@ int AudioEngineImpl::play2d(const std::string &fileFullPath ,bool loop ,float vo
|
||||||
break;
|
break;
|
||||||
|
|
||||||
auto& player = _audioPlayers[currentAudioID];
|
auto& player = _audioPlayers[currentAudioID];
|
||||||
auto initPlayer = player.init( _engineEngine, _outputMixObject, fileFullPath, volume, loop);
|
auto initPlayer = player.init( _engineEngine, _outputMixObject, FileUtils::getInstance()->fullPathForFilename(filePath), volume, loop);
|
||||||
if (!initPlayer){
|
if (!initPlayer){
|
||||||
_audioPlayers.erase(currentAudioID);
|
_audioPlayers.erase(currentAudioID);
|
||||||
log("%s,%d message:create player for %s fail", __func__, __LINE__, fileFullPath.c_str());
|
log("%s,%d message:create player for %s fail", __func__, __LINE__, filePath.c_str());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue