How i can play several background musics?

Hello, i began use cocos2d music engine, but i see some limitation. How i can realize next features:

  • Playback several music file in the same time. Adjust volume of each music file.
  • Loop music file from a certain time. For example: loop background music since 5 second.

AFAIK, playing more than 1 background music is not possible at this time with bare cocos. If you are targeting only iOS you can write a wrapper to AVAudioPlayer which provides this functionality. I don’t know if Android can play several audio files as background music, but if it can, then this would be achievable via JNI calls.

Pawel Lopusinski wrote:

AFAIK, playing more than 1 background music is not possible at this time with bare cocos. If you are targeting only iOS you can write a wrapper to AVAudioPlayer which provides this functionality. I don’t know if Android can play several audio files as background music, but if it can, then this would be achievable via JNI calls.

Is exists wrappers such as SimpleMusic but for my tasks?

Is playing more than one background music needed?
If it is a common requirement, then we will implement it.

Minggo Zhang wrote:

Is playing more than one background music needed?
If it is a common requirement, then we will implement it.
Yes it’s common requirement. Second requirement is desirable, but it’s can be implemented by other way. When you’ll plan to implement more then one background music?

We can implement it. But it is not an high priority issue.

We can implement it. But it is not a high priority issue.

And #2468 is created for it.

Minggo Zhang wrote:

And #2468 is created for it.

Hi! Can you guys implement starting a song file from a certain point? If you can pause and resume, maybe this is not that hard. :slight_smile:

Sergey Volkov wrote:

Hello, i began use cocos2d music engine, but i see some limitation. How i can realize next features:
>
* Playback several music file in the same time. Adjust volume of each music file.
* Loop music file from a certain time. For example: loop background music since 5 second.

you can try this:
http://www.shlzero.com/wordpress/?page_id=205

bye

Minggo Zhang wrote:

We can implement it. But it is not a high priority issue.

Thank you very much, I have a problem using more than one backgroundmusic in a row. Between one file and other, a little pause happen, and I cannot optimize the music as I want.