There is no problem with ios. If you move it with the emulator of android studio, it will not sound, I am raising the volume of the emulator.
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“btn.mp3”);
CocosDenshion::SimpleAudioEngine::getInstance()->setEffectsVolume(seVol);
CocosDenshion::SimpleAudioEngine::getInstance()->playEffect(“btn.mp3”);
Please tell me why only android does not produce sound.
Try running it on real hardware.
What android version?
What cocos2d-x version?
Also show logs.
Try .wav formate for testing.
and: preloadEffect takes time to load Of course it should play sound anyway.
Nexus 5 Android 5.1armeabi-v7a
cocos2d-x version 3.15
Thanks
The way to write the code is the same, but there were places where sound comes out and places that are not. Since I think that it is a problem of Emulator, it is safe to ignore this phenomenon for the time being.