Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try activating AudioSession in <strong>else if</strong> condition as follows:</p> <pre><code>AVAudioSession *session = [AVAudioSession sharedInstance]; NSError *error = nil; [session setCategory: AVAudioSessionCategoryPlayback error: &amp;error]; if (error != nil) NSLog(@"Failed to set category on AVAudioSession"); // AudioSession and AVAudioSession calls can be used interchangeably OSStatus result = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, RouteChangeListener, self); if (result) NSLog(@"Could not add property listener! %d\n", result); BOOL active = [session setActive: YES error: nil]; if (!active) NSLog(@"Failed to set category on AVAudioSession"); </code></pre> <p>But I believe this may not work because in my case what happened is when i was in background it was not getting any session. But try to analyze the <a href="http://developer.apple.com/library/ios/#samplecode/aurioTouch/Listings/ReadMe_txt.html" rel="nofollow noreferrer">aurioTouch example</a> of Apple and only go through <code>AppDelegate</code> file and Try to analyze <code>(void)rioInterruptionListener</code> method which explains the same problem.</p> <p>Are you using Live Streaming of audio?? then i would recommend you to go through my <a href="https://stackoverflow.com/questions/7515027/audio-queue-starts-failed">question's answer</a>, where a problem of queue start is solve by handling the error as given in my answer.</p> <p>Hope either of this could be Helpful to you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload