Android Oboe Library: 2 streams recording from 2 recording devices possible?

后端 未结 2 1922
别跟我提以往
别跟我提以往 2021-01-24 09:40
  • Device: HUAWEI P smart

  • Android-Version: 8.0.0

  • Generic Application:
    RecDev1 -> PlayDev1
    RecDev2 -> PlayDev2
    \"simult
2条回答
  •  南笙
    南笙 (楼主)
    2021-01-24 10:12

    ** according to Don Turner's answer: "Android does not allow you to open input (ie recording) audio streams to more than one audio device at the same time. This use case is not supported."

    ** More clearly:
    - Android does NOT support recording from more than ONE input devices at the same time.
    - Android does NOT support playback to more than ONE output devices at the same time.
    - and for sure, the combination of the 2 points above does NOT work either.

    ** This can be easily tested e.g. by running 2 instances of this AAudio Sample in parallel and selecting different output devices. This will just NOT work!

    ** This VERY IMPORTANT CONSTRAINT is not mentioned anywhere in the official documentation!!!

    ** Therefore, the following "example use case" is NOT supported by Android (oboe, aaudio, opensl es):

    USB-Audio-In ---> In-line-speaker
    and at the same time
    Mic ----> USB-Audio-Out

    ** I am quite disappointed, I spent time and money to start something based on this, assuming this was "basic" functionality...now I have to give up :-(

    ** If I find the right place, then I will enter a "request" to support this "feature", e.g. in AAudio.

    ** Hope this helps other people before they invest too much time in something beyond the current capabilities offered by Android and the corresponding libraries.


    ** A possible workaround indicated by donturner would be instead using a special USB-soundcard with 2 inputs and 2 outputs which are just separate channels in the same device. Unfortunately, this does not really work for me because I was targeting a low-cost solution without additional hardware (using the headset interface).

提交回复
热议问题