0

I have found already some similar discussion on this, but would like to investigate further and find out what's the best library and approach to use for a game made with Cocos2d v1 with the following requirements:

  • swap one soundtrack with another one, interlacing them (the current one lowers the volume whilst the other one increases)
  • have multiple audio effects (like bullet shoot sounds different for each enemy)

Cocosdenshion seems to be the best approach for a cocos2d game (rather than using avplayer). Would you agree?

Thanks!

Community
  • 1
  • 1
mm24
  • 9,280
  • 12
  • 75
  • 170
  • I use Cocosdenshion and works without problems – Sebastián Castro Feb 24 '12 at 11:54
  • I use cocosdhenshion without any issues, although i dont attempt interleaving. When the game switches from a logical scene to another, i fade-out and fade the new scene in, where the background music fades out and in with the scene itself. – YvesLeBorg Feb 24 '12 at 14:06
  • Did anyone try to fade in and fade out multiple times the same two tracks? (interleaving).. @Setrio, have you tried to interleave? – mm24 Feb 25 '12 at 10:21
  • 1
    I prefer ObjectAL over CocosDenshion, makes a number of things easier, if not trivial. – CodeSmile Feb 25 '12 at 23:44
  • @mm24 noup, i never tried that – Sebastián Castro Feb 26 '12 at 00:18
  • @LearnCocos2D why would you prefer ObjectAL for that? I saw that both can do audiometering, and interlacing but wanted to understand.. is there anywhere a comparison table among all libraries? I did found a good description of ObjectAL but nothing comparing all. Thanks :) – mm24 Feb 28 '12 at 09:44

1 Answers1

0

Following up this question.. I did use "CDXPropertyModifierAction.h" library which allowed me to reference to the shared SimpleAudioEngine of the application as well as the CDAudioManager.

Although, having 4 tracks and several .caf effects, I have a consierable memory footprint. I read the comment of @LearnCocos2D and I will now try integrating ObjectAL and do some benchmarks on performance and memory footprint.

I will add comments to this answer, and please do feel free to do so as well to contribute.

Thanks a lot for your comments..

mm24
  • 9,280
  • 12
  • 75
  • 170