Questions tagged [simpleaudioengine]

SimpleAudioEngine is a Cocos2d library, providing support for basic audio functions. It wraps a CDAudioManager to provide higher level access to sound effects and background music playing capability.

SimpleAudioEngine is a Cocos2d class that provides access to basic sound effect and audio playback functionality.

The bulk of its functionality is derived from the CDAudioWrapper class (indeed, it is just a wrapper around it).

References:

75 questions
1
vote
1 answer

Cocos2d memory leaks : SimpleAudioEngine

Getting lot of memory leaks in Cocos2D iphone game. I used these calls to play music and effect. [[SimpleAudioEngine sharedEngine] preloadEffect:kSoundTap]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:kMusic_LaunchScreen]…
Guru
  • 21,652
  • 10
  • 63
  • 102
1
vote
3 answers

Sound button not working? COCOS2D

I tried this code it didn't work, I want the button to play sound when it is clicked. -(void)starButtonsound:(id)sender { [[SimpleAudioEngine sharedEngine] playEffect:@"fire_truck_1.wav"]; } In init starMenuItemsound = [CCMenuItemImage …
1
vote
1 answer

SimpleAudioEngine non-exception breakpoint

breakpoint http://dl.dropbox.com/u/60578443/exception_breakpoint.png exception http://dl.dropbox.com/u/60578443/simpleaudioengine_exception.png I've met a issue in SimpleAudioEngine in cocos2d. As the image shows,I added a breakpoint that pauses the…
ManuQiao
  • 708
  • 8
  • 20
1
vote
2 answers

iOS Coco2D playing 2 background sounds

Can Coco2D playing 2 background sounds? [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"sound1.caf" loop:YES]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"sound2.caf" loop:YES]; Can sound2 be set to half of the volume and sound1…
jason white
  • 687
  • 4
  • 11
  • 28
1
vote
1 answer

How to stopEffect in Cocos2d via ALuint?

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…
The Learner
  • 155
  • 11
1
vote
1 answer

how to turn music and sound effects on/off in whole application from anywhere in COCOS2D?

I have 8 levels in my Game application. Each level screen has sound control button on top-right corner. When I click on that button it Toggles sound on/off. If it is turned off in level one, it should be off in all levels. How can I do that?
maniclorn
  • 1,081
  • 3
  • 12
  • 23
1
vote
0 answers

using SimpleAudioEngine with avaudioRecorder

I know i cant use the SimpleAudioEngine before the avaudioRecorder because it sets the session to play and not record. If i record with the recorder then play with : [[SimpleAudioEngine sharedEngine] playEffect:soundFilePath pitch:2.0f pan:0.0f…
user1280535
  • 347
  • 3
  • 13
0
votes
1 answer

length of audio file for playeffect in SimpleAudioEngine

for play effect using [[SimpleAudioEngine sharedEngine] playEffect:@"sound.mp3"]; What is the limit length of used audio file?
Praveen
  • 11
  • 1
  • 3
0
votes
2 answers

cocos2d - How can I play sound effect only when the user is touching?

How can I play a sound effect only when the user is touching? Just repeat it and stop when the user ends the touch. Thanks.
user465166
  • 39
  • 6
0
votes
1 answer

how to use simpleaudioengine to play audio in a specified duration

i want to use SimpleAudioEngine to play a 2s mp3, but not so simple. I want to this audio plays 4s, that it, this mp3's duration should be 4s. Any good idea can solve this problem, Thank u very much
Chelsea Wang
  • 599
  • 2
  • 5
  • 19
0
votes
1 answer

Error importing SimpleAudioEngine

I want to use SimpleAudioEngine for the music in a cocos2d game I'm working on. When I import SimpleAudioEngine.h in my game layer I get syntax errors in CVPixelBuffer.h and CMFormatDescription.h. I've created a new clean cocos2d application and…
Oded Harth
  • 4,367
  • 9
  • 35
  • 62
0
votes
1 answer

SimpleaudioError: Error opening PCM device. -- CODE: -5 -- MSG: Input/output error

When I run play_audio() it works without any problem and I can hear the audio playing. from multiprocessing import Process from pydub import AudioSegment from pydub.playback import play name = "audio.wav" def play_audio(): wavf=…
ramyun
  • 13
  • 3
0
votes
1 answer

Errors when importing SimpleAudioEngine

When I import SimpleAudioEngine.h: #import "SimpleAudioEngine.h" I get six errors. 3 of them are related to CVPixelBuffer.h and 3 are related to CMFormatDescription.h. How can I fix this?
Oded Harth
  • 4,367
  • 9
  • 35
  • 62
0
votes
1 answer

Cocos2d app with SimpleAudioEngine

I am developing a cocos2d IPhone app using the SimpleAudioEngine to play some mp3 sounds. My problem is that when I resume the app after a long time it is in background some sounds are no longer played. Have you ever experienced this? Do you know if…
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
0
votes
1 answer

SimpleAudioEngine shuffle playlist

i want to shuffle a dozen of songs in my game. Next song should not be the same as current song. [[[SimpleAudioEngine sharedEngine] playBackgroundMusic: song]; There should be a loop and song should be randomized, [[NSString stringWithFormat:…
OMGPOP
  • 1,995
  • 8
  • 52
  • 95