0
$\begingroup$

I'm trying to open 2 input streams from the same microphone on Oboe but it's not working.

One of the audio inputs I'm opening is like this:

defaultBuilder().setDirection(oboe::Direction::Input)
        ->setFormat(oboe::AudioFormat::Float) // For now
        ->setChannelCount(1) // Mono in for effects processing
        ->openManagedStream(inStream);

then in the other:

builder.setChannelCount(channelCount)
            ->setDirection(isInput ? oboe::Direction::Input : oboe::Direction::Output)
            ->setSharingMode((oboe::SharingMode) oboe::SharingMode::Shared)
            ->setPerformanceMode((oboe::PerformanceMode) performanceMode)
            ->setInputPreset((oboe::InputPreset)inputPreset)
            ->setSessionId((oboe::SessionId) sessionId)
            ->setSampleRate(sampleRate)
            ->setFormat((oboe::AudioFormat) format)
            ->setChannelConversionAllowed(channelConversionAllowed)
            ->setFormatConversionAllowed(formatConversionAllowed)
            ->setSampleRateConversionQuality((oboe::SampleRateConversionQuality) rateConversionQuality)
            ;

Is it possible that because of the different properties of each open, things dont work? One of them is mono for processing some effects and the other is stereo for voice recording. The format may differ too, I don't know.

But in principle, I think it should be possible. Android should just split the microphone input into 2 and then act accordingly for each stream.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.