developer icon

AVAudioSessionCategoryAmbient

developer | PRO | 09/21/13 09:57:26 PM UTC | 0 ⭐ | 435 👁️ | Never ⏰ | []
Objective C |

0 B

|

None

|

0 👍

/

0 👎

// Allows Playback of Sounds in app without pausing iPod music playback
// http://is.gd/YmQ65Q
// This category allows audio from the iPod, Safari, and other built-in applications to
// play while your application is playing audio.
 
    AVAudioSession *session =[AVAudioSession sharedInstance];
    float version = [[[UIDevice currentDevice] systemVersion] floatValue];
    if (version <6.0) {
        [session setCategory:AVAudioSessionCategoryAmbient error:nil];
    }
    else {
        [session setCategory: AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error: nil];
    }

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎