1

Where is the soundId in Cocos2d?

I understand that it is returned from somewhere, but how do you capture this value or where it is?

I am trying to stop an effect using:

[[SimpleAudioEngine sharedEngine] stopEffect:<#(ALuint)#>];

But, I do not know where to get the soundId for said effect.

Any help is greatly appreciated.

Thanks.

Guru
  • 21,652
  • 10
  • 63
  • 102
The Learner
  • 155
  • 11

1 Answers1

3

The ALuint is returned from playEffect:

ALuint effect = [[SimpleAudioEngine sharedEngine] playEffect:@"effect.caf"];
[[SimpleAudioEngine sharedEngine] stopEffect:effect];
CodeSmile
  • 64,284
  • 20
  • 132
  • 217