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
This commit is contained in:
egnehots 2017-10-10 20:43:37 +02:00
parent 33a8cde056
commit bd88d9d6ff
1 changed files with 3 additions and 0 deletions

View File

@ -158,6 +158,9 @@ impl Voice {
} }
let au_type = if cfg!(target_os = "ios") { 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 coreaudio::audio_unit::IOType::RemoteIO
} else { } else {
coreaudio::audio_unit::IOType::DefaultOutput coreaudio::audio_unit::IOType::DefaultOutput