I'm using cocoss2d with c++ on windows 10 and I'm trying to play background music. It works the first time I debug the game but on the second time I hit run it throws these exceptions
Exception thrown at 0x765F3E28 (KernelBase.dll) in MiniGolf.exe: 0x000006BA: The RPC server is unavailable.
Exception thrown at 0x765F3E28 (KernelBase.dll) in MiniGolf.exe: 0x0000000E: Not enough storage is available to complete this operation.
Assert failed: getFileSize should be override by platform FileUtils
Assertion failed!
I simply use this line to start the music.
CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("level_music1.wav",true);
I'm not sure what's going on can anyone share a light with me ?
cocos2d-x 3.9 CCWinRTUtils.cpp line 336 added
if (ret[0] == '/') {
ret = ret.substr(1, ret.length() - 1);
}
Got it! It's not that good fix, but still.
File: CCWinRTUtils.cpp Method: createMappedCacheFile
I have commented if/else construction and call FileUtils::getInstance()->removeFile(prevFile)
all the time.
Now it works fine on both Windows10 and Windows Phone 8.1.
As I understand now the caching works only for current session. The previous solution (caching by hashtag) was for caching sounds loaded from the Internet and not needed for local files.
User contributions licensed under CC BY-SA 3.0