iOS change method of bypassing voice processing #1195
+3
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementation of
AudioIODevice::setAudioPreprocessingEnabled
injuce_ios_Audio.cpp
uses theAVAudioSession::setMode
method to set theAVAudioSessionMode
of the session toAVAudioSessionModeMeasurement
. However, this also removes the processing of output signals, causing a drastic reduction in output playback level (see https://developer.apple.com/documentation/avfaudio/avaudiosessionmodemeasurement?language=objc). While this might be desirable behaviour for specific use cases, thesetAudioPreprocessingEnabled
description injuce_AudioIODevice.h
states thatsuggesting the intention is to only bypass audio input preprocessing.
My proposal is to instead use the
AudioUnitProperty
kAUVoiceIOProperty_BypassVoiceProcessing
which only disables the input processing, not the output processing. (https://developer.apple.com/documentation/audiotoolbox/1534007-voice-processing_i_o_audio_unit_proper/kauvoiceioproperty_bypassvoiceprocessing?language=objc)If this is not desirable, then I would recommend that another method be added,
AudioIODevice::setInputProcessingEnabled
, which would do the same thing suggested above.This is crucial to record singing/vocals on iOS, since the Automatic Gain Control in the phones introduce a ton of noise when not actively singing/talking, as in when you're waiting for the place you want to come in with your singing.