yo3ggx Active Member Licensed User Longtime User Feb 6, 2023 #1 Hello, I want top use a Bluetooth headset with AudioStreamer. I'm doing the initialization using B4X: Copy HeadsetStreamer.Initialize2(VOICE_COMMUNICATION,"HeadsetStreamer",8000,True,16,STREAM_MUSIC) Unfortunately audio is playing on the headset, but phone mic is still used for audio input. Tried with DEFAULT or MIC as audioSource with the same results. Any hint on how can I use the mic from the headset? Thank you.
Hello, I want top use a Bluetooth headset with AudioStreamer. I'm doing the initialization using B4X: Copy HeadsetStreamer.Initialize2(VOICE_COMMUNICATION,"HeadsetStreamer",8000,True,16,STREAM_MUSIC) Unfortunately audio is playing on the headset, but phone mic is still used for audio input. Tried with DEFAULT or MIC as audioSource with the same results. Any hint on how can I use the mic from the headset? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2023 #2 Are you able to capture audio from the headset with one of the other values: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource ? If so then you can use two AudioStreamer objects. Upvote 0
Are you able to capture audio from the headset with one of the other values: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource ? If so then you can use two AudioStreamer objects.
yo3ggx Active Member Licensed User Longtime User Feb 7, 2023 #3 Erel said: Are you able to capture audio from the headset with one of the other values: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource ? If so then you can use two AudioStreamer objects. Click to expand... No, the mic from the BT headset is not used with any possible values accepted for the rec device in AudioStreamer, even if I activate SCO. More, if an USB audio device is connected to the smartphone, that one is used by default. In between I had some partial success by changing the audio device after AudioStreamer is initialized (for both in and out), using setPreferredDevice for audioRecord and audioTrack inside AudioStreamer. Audio routing in Android If it will work as expected, I will post the code in the "Tutorials & Examples" section of the forum, maybe can be helpful for other users too. You can select not only BT headset, but even USB audio devices, internal earpiece or speaker, wired headset and so on. Upvote 0
Erel said: Are you able to capture audio from the headset with one of the other values: https://developer.android.com/reference/android/media/MediaRecorder.AudioSource ? If so then you can use two AudioStreamer objects. Click to expand... No, the mic from the BT headset is not used with any possible values accepted for the rec device in AudioStreamer, even if I activate SCO. More, if an USB audio device is connected to the smartphone, that one is used by default. In between I had some partial success by changing the audio device after AudioStreamer is initialized (for both in and out), using setPreferredDevice for audioRecord and audioTrack inside AudioStreamer. Audio routing in Android If it will work as expected, I will post the code in the "Tutorials & Examples" section of the forum, maybe can be helpful for other users too. You can select not only BT headset, but even USB audio devices, internal earpiece or speaker, wired headset and so on.