Created
June 25, 2015 15:24
-
-
Save mvrilo/4052930b9f860e45ea07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(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