From bd88d9d6ffba1a4e8965b3aafb9a4c3b6012cfe4 Mon Sep 17 00:00:00 2001 From: egnehots Date: Tue, 10 Oct 2017 20:43:37 +0200 Subject: [PATCH] Document RemoteIO as ios unit fallback iOS provides three I/O (input/output) units. The vast majority of audio-unit applications use the Remote I/O unit, which connects to input and output audio hardware and provides low-latency access to individual incoming and outgoing audio sample values. For VoIP apps, the Voice-Processing I/O unit extends the Remote I/O unit by adding acoustic echo cancelation and other features. To send audio back to your application rather than to output audio hardware, use the Generic Output unit. See https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/AudioUnitHostingGuide_iOS/UsingSpecificAudioUnits/UsingSpecificAudioUnits.html --- src/coreaudio/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreaudio/mod.rs b/src/coreaudio/mod.rs index eac12d2..9f3b662 100644 --- a/src/coreaudio/mod.rs +++ b/src/coreaudio/mod.rs @@ -158,6 +158,9 @@ impl Voice { } let au_type = if cfg!(target_os = "ios") { + // The DefaultOutput unit isn't available in iOS unfortunately. RemoteIO is a sensible replacement. + // See + // https://developer.apple.com/library/content/documentation/MusicAudio/Conceptual/AudioUnitHostingGuide_iOS/UsingSpecificAudioUnits/UsingSpecificAudioUnits.html coreaudio::audio_unit::IOType::RemoteIO } else { coreaudio::audio_unit::IOType::DefaultOutput