- Device: HUAWEI P smart
- Android-Version: 8.0.0
- Generic Application:
RecDev1 -> PlayDev1
RecDev2 -> PlayDev2
"simultaneous streaming"
where
RecDev can be built-in mic, USB-mic or headset-mic
and
PlayDev can be built-in speaker, USB-speaker or headset-speaker
any input and output device shall be streamed "SIMULTANEOUSLY" in any combination as shown above.
- Example Application (all devices with "1" channel):
Guitar -> wired-mic -> [(processing)] -> built-in-Speaker
Voice -> built-in mic -> [(processing)] -> wired-speaker
"simultaneous streaming"
- Code:
is just an extended version of the sample "LiveEffect" provided by oboe.
Up to now I tried:
. straight forward extension
. LiveEffectEngine no longer singleton (2 instances with own long mEngineHandle)
. use of 2 separate threads
. set a callback for the recording stream(s)
- Note:
I get the warningStream is NOT low latency
for all 4 streams but all parameters match:
SharingMode::Exclusive PerformanceMode::LowLatency (not accepted) mSampleRate 48000 (default of PlaybackDevice) AudioFormat::I16
with OpenSL-ES API: I cannot start the second recordingStream, stream->requestStart()
returns "ErrorInternal"
with AAudio API: I cannot open the second recordingStream, builder.openStream()
returns "ErrorInvalidState"
In both cases I call builder->setCallback(nullptr)
so I thought using separate threads might help, but this didn't solve the problem.
Any ideas?