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
2
votes
3 answers

"SimpleAudioEngine has not been declared" error when trying to enable music pausing in Cocos2D-X

So using Cocos2D-X, in the AppDelegate.cpp file, I uncomment the line: SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic(); so that my audio will be paused when the app is exited. However, when I do this, I get the error stated in the title.…
David Small
  • 581
  • 1
  • 10
  • 25
2
votes
3 answers

Sound effect stops midway when multiple sounds are being played?

I have a charging up sound effect that is 8 seconds long, which is triggered to play only at the end of each level in my game. The problem is, the sound effect stops midway through when there are other sounds playing at the same time (lasers,…
rizzlerazzle
  • 125
  • 1
  • 8
1
vote
1 answer

Play sound in Sequence in cocos2d

how to play sound in cocos2d in sequence does any body have any idea for example i have three sound like [[SimpleAudioEngine sharedEngine] playEffect:[CommanMethods GetCompleteSoundPath:objplate.OrderOneSound]]; [[SimpleAudioEngine sharedEngine]…
Faizan Malik
  • 95
  • 1
  • 13
1
vote
1 answer

Use of preload effect in SimpleAudioEngine

I read about preloading sounds in SimpleAudioEngine through [[SimpleAudioEngine sharedEngine] preloadEffect:@"bell.wav"]; But, with this there are memory leaks which I read on couple of sites. On some websites it was used like this:…
1
vote
2 answers

How to prevent sprites from being detected within a particular area (which is also a sprite) in Cocos2D?

I want to prevent sprites from being detected within a particular area in Cocos2D. In my game, sprites are spawning from the bottom which gets detected on touch. I have added a newArea (an area) where sprites spawn from beneath the newArea (as z…
Arshad Parwez
  • 1,563
  • 2
  • 19
  • 29
1
vote
1 answer

Large number of Sound Effects with SimpleAudioEngine

Background: My background music is being played as a sound effect because I want to change the pitch between each repetition of the tune. The Issue: While the background music is playing there's a lot of other short sound effects happening. After a…
Jason Pawlak
  • 792
  • 1
  • 6
  • 20
1
vote
0 answers

Cocos2D: Play Sound on Touches Moved

I currently have a dial that rotates on touch. I would like to include a "click" sound effect when the dial is moving. I have the click sound working, but it is a bit chaotic. I currently put this in my touches moved: [[SimpleAudioEngine…
Jeff Keeme
  • 46
  • 2
1
vote
3 answers

ModuleNotFoundError: No module named 'simpleaudio'

Basically, I recently started Python. I'm working on a project where I need audio to play. I searched up some libraries that can play audio and tried simpleaudio. I'm using Windows and sucessfull installed simpleaudio using: pip3 install…
Zx Loh
  • 11
  • 1
  • 3
1
vote
5 answers

App crashes on backgrounding because of SimpleAudioEngine

So I׳m trying to play some effects in my Cocos2D game using SimpleAudioEngine , but after I have added them my app crashes when it goes to background (multitasked). I searched for this problem in the internet but all the solutions that I found…
Cokegod
  • 8,256
  • 10
  • 29
  • 47
1
vote
1 answer

Trying to play a Random Sound using SimpleAudioEngine, no sound

So initially the app I was going to produce only made one sound upon swiping up. The code for that was [[SimpleAudioEngine sharedEngine] playEffect:@"Swoosh.mp3"]; CCMoveTo *moveto=[CCMoveTo actionWithDuration:0.50…
1
vote
0 answers

CocosDenshion::SimpleAudioEngine pauses all actions when playing an effect

I have implemented audio in my project, when initiating my own Sprite class in create() function with this code: CocosDenshion::SimpleAudioEngine::sharedEngine()->getInstance()->preloadEffect("fx/frog.wav"); and when the sprite class is playing the…
ahdev
  • 11
  • 4
1
vote
2 answers

how to loop a sound effect in Simple Audio Engine

I have searched extensively on how to loop a sound effect with simple audio engine, but haven't made much progress apart from hello with looping sfx on the cocos2d forum which has several issues. How can I loop a sound effect in Simple Audio Engine?
1
vote
1 answer

Cocos2d: thread error when trying to add background music

Hello I am making a cocos2d side scroller. I am trying to add a background audio file. I am using SimpleAudioEngine. This is the code: [[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"Soundtrack.mp3" loop:YES]; But when I run it it gives me…
1
vote
0 answers

Clearing audio cache in ios

I have an ios app that's written with cocos2d, and uses SimpleAudioEngine for playing audio. When playing/preloading a sound using: [[SimpleAudioEngine sharedEngine] preloadEffect:@"x.mp3"]; [[SimpleAudioEngine sharedEngine]…
am1987
  • 347
  • 3
  • 13
1
vote
1 answer

SimpleAudioEngine stop music/sound if screen touched

How would I stop the music/sound from playing if the user touches the screen. currently the sound continues to play out into the next scene. - (void)setup { self.isTouchEnabled = YES; CGSize winSize = [[CCDirector sharedDirector]…
acctman
  • 4,229
  • 30
  • 98
  • 142