Play audio sprites

My game has lot of audio files.
I wanted to pack it into single audio file to reduce download times.
And play the audio from a single file similar to Howlerjs.

May I know something like this is possible with the Cocos Creator audio system?

Yes! Already did that. Please use Audiosprite to create your audio track. It will output mp3, ogg, m4a and json file. Use the mp3 for web or android and ogg for ios.

You need to create a new component for that. Use the update method to track down your current playback audios. The json file has all the information you need in order to know where an when to stop each sound.

Good luck!

BTW… @slackmoehrle I think this is a must have component for the cocos engine. Lots of engines can do that and I dont think that the developer needs to develop a component just for that manner.

2 Likes

Thank you. I can pass along to the team.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.