|
|
|
|
@ -417,10 +417,12 @@ struct AudioSource: Hashable {
|
|
|
|
|
let session = AVAudioSession.sharedInstance()
|
|
|
|
|
|
|
|
|
|
guard let availableInputs = session.availableInputs else {
|
|
|
|
|
// I'm not sure when this would happen.
|
|
|
|
|
// I'm not sure why this would happen, but it may indicate an error.
|
|
|
|
|
// In practice, I haven't seen it on iOS9+.
|
|
|
|
|
//
|
|
|
|
|
// I *have* seen it on iOS8, but it doesn't seem to cause any problems,
|
|
|
|
|
// so we do *not* trigger the assert on that platform.
|
|
|
|
|
if #available(iOS 9.0, *) {
|
|
|
|
|
// Fails on iOS8. We *could* remove this assert, but it might
|
|
|
|
|
// still be helfpul in catching a bug in a more used platform.
|
|
|
|
|
owsFail("No available inputs or inputs not ready")
|
|
|
|
|
}
|
|
|
|
|
return [AudioSource.builtInSpeaker]
|
|
|
|
|
|