You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a specific InputPreset is specified in Audio Stream Builder, oboe may choose to fallback to a different preset if it's unavailable on a device. For instance, when opening OpenSLES stream, if setting a given preset fails, it falls back to Voice Recognition. Similarly, the recently introduced Voice Performance preset fallsback to Voice Recognition on older devices.
When such fallback happens, FilterAudioStream still has the input preset as provided in the builder, but not the actual one in the underlying stream. This is misleading for the developers to think that the requested input preset is available on the device.
The following code may have to copy input preset as well to address this problem.
The InputPreset can be coerced from VoicePerformance to
VoiceRecognition. But getInputPreset() returned the wrong value.
Fixed for FilterAudioStream and OpenSL ES.
Fixes#1090
By the way, isCompatible() does not check InputPreset because the FilterAudioStream does not provide a conversion for that InputPreset. It only converts data rates, formats, channels and callback sizes. So it is OK.
The InputPreset can be coerced from VoicePerformance to
VoiceRecognition. But getInputPreset() returned the wrong value.
Fixed for FilterAudioStream and OpenSL ES.
Fixes#1090
When a specific InputPreset is specified in Audio Stream Builder, oboe may choose to fallback to a different preset if it's unavailable on a device. For instance, when opening OpenSLES stream, if setting a given preset fails, it falls back to Voice Recognition. Similarly, the recently introduced Voice Performance preset fallsback to Voice Recognition on older devices.
When such fallback happens,
FilterAudioStream
still has the input preset as provided in the builder, but not the actual one in the underlying stream. This is misleading for the developers to think that the requested input preset is available on the device.The following code may have to copy input preset as well to address this problem.
oboe/src/common/FilterAudioStream.h
Lines 55 to 57 in 9a62b97
Additionally, the following sections in
AudioStreamBuilder.cpp
may also need to considerInputPreset
as it can also be leftkUnspecified
:oboe/src/common/AudioStreamBuilder.cpp
Lines 82 to 87 in 9a62b97
oboe/src/common/AudioStreamBuilder.cpp
Lines 124 to 136 in 9a62b97
The text was updated successfully, but these errors were encountered: