when the external mute switch is on the app has no sound. I use SimpleAudioEngine in my app to play sound effects. How can I play sounds even if the mute switch is set to silent?
Asked
Active
Viewed 696 times
0
-
1It doesn't work this way. If a user mutes the device, you can't override it-- all apps get muted. – JRG-Developer Feb 26 '13 at 03:58
-
is there any way to get working.I see in other app it working. – Seven Nguyen Feb 26 '13 at 04:09
-
1The mute button mutes. Nuff said. Apple might not approve respectively might remove your app from the App Store if they find out or hear your app doesn't play by the rules. – CodeSmile Feb 26 '13 at 09:17
-
1Why would you want to prevent your user from being able to mute the sound?? Trying to irritate them? – dqhendricks Feb 26 '13 at 16:41
2 Answers
1
If you initialise with [CDAudioManager initAsynchronously:kAMM_PlayAndRecord];
the mute switch is overridden. This is as far as I know also the only way to get microphone input.

Sebastian
- 7,670
- 5
- 38
- 50
-
This answer will allow you to play audio even if the mute switch is engaged, but why actively annoy your users? If they've got the mute switch on, it very likely means that they don't want to hear anything from your (or any other) app. – Josh Buhler Jun 14 '13 at 18:13
0
When I used [CDAudioManager initAsynchronously:kAMM_PlayAndRecord];
I was faced with a very low volume problem. Use [CDAudioManager initAsynchronously:kAMM_MediaPlayback];
instead and volume won't be affected.
This will also work in cocos2d-x (either with c++ or js) since that also uses cc.audioengine.

Mou Janki
- 41
- 2