0

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?

Guru
  • 21,652
  • 10
  • 63
  • 102

2 Answers2

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 (either with c++ or js) since that also uses .

Mou Janki
  • 41
  • 2