mirror of https://github.com/axmolengine/axmol.git
no mp3 support for wp8
This commit is contained in:
parent
3834d4e80b
commit
ea9fb140fa
|
@ -97,6 +97,15 @@ bool ComAudio::serialize(void* r)
|
|||
CC_BREAK_IF(resType != 0);
|
||||
if (strcmp(className, "CCBackgroundAudio") == 0)
|
||||
{
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
|
||||
// no MP3 support for CC_PLATFORM_WP8
|
||||
std::string::size_type pos = filePath.find(".mp3");
|
||||
if (pos == filePath.npos)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
filePath.replace(pos, filePath.length(), ".wav");
|
||||
#endif
|
||||
preloadBackgroundMusic(filePath.c_str());
|
||||
bool loop = DICTOOL->getIntValue_json(*v, "loop") != 0? true:false;
|
||||
setLoop(loop);
|
||||
|
|
Loading…
Reference in New Issue