HI,
i have developed my first ios game using cocos2d-x 3.0 and i ported it to Android, all things are right except the sound, the app doesn’t play the whole of a sound.
How to fix this problem on the android ( on iOS it didn’t occur).
Great solution. My problem case is a bit different – I have a single folder of source wav files, sorted by quality and required by different games game.
My sound file pre-processing application iterates the folder to export batch and bash files to process them (a long series of lines like the ones I posted, above.)
To make things really simple, that pre-processing application also generates a .cpp and .h file so the application that needs them can use them easily.
This way I don’t have to manually maintain a conversion script, and I can reprocess my files and generate the C++ implementation for a game. This way, I don’t have to maintain any defines for the sound filenames, the enumeration of sounds, or write my own pre-loading logic, it’s just generated based on game membership for a particular sound file.
My workflow is then as follows:
add sound file to library, tag it for the games that need it
run the pre-processor & commit script output
run the re-generated conversion scripts (some on windows, some on the mac)
@yagoub
Hi! I use wav for all my project, you can try this.
Android can play mp3 but when you play effect the sound will play in short time. I don’t know.
In window phone you have to play wav.
Hope this help
Thanks, i changed playEffect to playBackgroundMusic, and it works, but i’m afraid if this has performance issue because i have 50 sounds and i play one sound in the same time.