Please tell me. No sound comes out

Please tell me. No sound comes out
0.0 0

#1

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.


#2

Try running it on real hardware.

What android version?

What cocos2d-x version?


#3

Also show logs.

Try .wav formate for testing.

and: preloadEffect takes time to load :slight_smile: Of course it should play sound anyway.


#4

Nexus 5 Android 5.1armeabi-v7a
cocos2d-x version 3.15

Thanks


#5

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.