Ich teste meine App in XCode 6 und finde ein Problem mit AVAudioSession in iOS8.iOS8 AVAudioSession setActive Fehler
Als ich
[[AVAudioSession sharedInstance] setActive:NO error:nil];
nennen bekomme ich folgende Fehlermeldung:
AVAudioSession.mm:623: -[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.
In AVAudioSession.h, heißt es
Note that this method will throw an exception in apps linked on or after iOS 8 if the session is set inactive while it has running or paused I/O (e.g. audio queues, players, recorders, converters, remote I/Os, etc.).
Aber ich bin nicht sicher, wie kann Ich überprüfe, ob I/O läuft und wie kann ich alles entfernen, wenn ich die Audio Session zurücksetzen muss.
Können Sie den Kontext erklären und einen Anwendungsfall angeben, warum Sie überprüfen möchten, ob I/O ausgeführt wird? – vladof81
@vladof Wenn es keinen solchen Fehler gibt, muss ich nicht überprüfen, ob I/O läuft. So die Situation ist, möchte ich sicherstellen, dass es keine laufenden I/O, wenn ich setActive aufrufen: Nein – xialin
Sind Sie das beheben? – Anton