Reputation: 305
When I run my game on win32 platform, my sounds don't play. But sounds are playing normally in android platform.
I'm using:
auto audio = CocosDenshion::SimpleAudioEngine::getInstance();
audio->playEffect("sounds/jump.ogg");
How can fix this? thanks
Upvotes: 0
Views: 403
Reputation: 20140
According to cocos2d-x wiki, .mid
and .wav
only supported on window desktop.
Sound Effects
| Platform | supported sound effects formats |
|-----------------|:-----------------------------------:|
| Android Supports| .ogg , .wav format. |
| iOS | .mp3, .wav, .caf |
| Windows Desktop | .mid and .wav only |
Above file format table is for SimpleAudioEngine
, currently I am using .ogg
file on win32 desktop with new experimental AudioEngine
#include "audio/include/AudioEngine.h"
experimental::AudioEngine::play2d("sounds/jump.ogg", false, 1.0);
Upvotes: 4