IOS OpenAL and silent switch
Asked Answered
E

1

1

I'm using 4.3.2 IOS and OpenAL and it seems that it doesn't care about the silent switch. (while it was working nicely with previous IOS versions)

Also the trick using AudioSessionGetProperty to 'read' the switch status is not working anymore. Thus I can't even mute using code.

Any hint, news about it recently?

Embarkation answered 14/6, 2011 at 7:12 Comment(0)
F
1

You can still use programmatic approaches to get the mute switch state, however there's one thing you need to be sure about:

set your AVAudioSession to Ambient! If you set it to Playback for example, that will not care about the mute switch state!

You can simply set the state like this:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];

To find some code examples for querying the mute switch state from within your app, you can find working samples here.

I had the same issue as you had when I was using Finch for OpenAL. I just set the soundengine to initiate an Ambient session and now my mute switch works properly:

[soundEngine activateAudioSessionWithCategory:AVAudioSessionCategoryAmbient];
Flagwaving answered 13/10, 2011 at 0:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.