Because just contact COCOS2DX, a lot of knowledge point is not very clear, online download example program, in Win32 no sound, but transplant on Android have voice.
Online check, is due to different platforms supported by different audio formats caused by the audio file to transcode.
Reference Official Document: http://cn.cocos2d-x.org/article/index?type=cocos2d-x&url=/doc/cocos-docs-master/manual/framework/ Native/v3/audio-and-effect/zh.md
supported platforms and formats
The music formats supported by Cocosdesion are as follows:
platform |
common file formats supported |
remarks |
android |
mp3, Mid, OGGG, WAV |
|
iOS |
AAC , CAF, MP3, M4A, wav |
|
Windows |
Mid, MP3, WAV |
No |
The audio formats supported by Cocosdesion are as follows:
Platform |
common file formats supported |
Notes |
Android |
OGGG, WAV |
Support for WAV is not perfect |
iOS |
CAF , M4A |
You can play all the formats supported by Cocos2d-iphone cocosdesion |
Windows |
Mid, WAV |
No |
"COCOS2DX Audio" has sound on Android, but Win32 has no sound