anarchuser / mic_stream

Flutter plugin to get an infinite audio stream from the microphone
https://pub.dev/packages/mic_stream
GNU General Public License v3.0
100 stars 68 forks source link

IOS: the start of the recording switches the audio output to device's speakers from headphones #45

Open bbader-kada opened 2 years ago

bbader-kada commented 2 years ago

After the init of the MicStream, the device switches its audio output to it's speakers. And because of this when I try to play audio (with audioplayers plugin) and record through mic in the same time, the output is always the device's speakers. My goal would be to listen to the audio continuously on headphones even if the recording started.

anarchuser commented 2 years ago

Thanks for mentioning this. Sadly, I cannot really help you. I have not written the IOS part of the plugin, and I do not know how I/O device selection is handled on IOS. The plugin should definitely not change the output device, and I can confirm that on Android, it does not do so.

If you have some experience with IOS, please have a look through the code in the ios folder. If you find the source of this issue and fix it, I'm happy to integrate the changes. However, I can neither help with the code nor test the plugin on an IOS device.