Skip to content

Instantly share code, notes, and snippets.

@mvrilo
Created June 25, 2015 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvrilo/4052930b9f860e45ea07 to your computer and use it in GitHub Desktop.
Save mvrilo/4052930b9f860e45ea07 to your computer and use it in GitHub Desktop.
-(void)setAmbient:(id)args
{
NSError* error = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: &error];
if (!error || !success) {
DebugLog(@"Could not set category");
}
}
-(void)setAmbientDuckOthers:(id)args
{
NSError* error = nil;
BOOL success = [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient
withOptions: AVAudioSessionCategoryOptionDuckOthers
error: &error];
if (!error || !success) {
DebugLog(@"Could not set category");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment