Streaming microphone audio from iPhone to Xamarin

Recording using AudioQueue sound and Monotouch static sound demonstrates how to get sound through an iPhone microphone into AudioQueue using Xamarin.iOS. My question is: how can I constantly record a microphone? I basically want to keep the microphone on while the application is open, and continuously captures the audio stream (note that I do not want to save the stream to a file). Inside a long while? Loop

+1
source share
1 answer

This should work: https://github.com/sami1971/SimplyMobile/blob/master/iOS/SimplyMobile.Media/Audio/AudioStream.cs

Initialize and use Start () when the application starts, and then call Stop () when the application closes (or the background goes). Captured buffers are delivered through the OnBroadcast event handler.

EDIT: Here is a quick WaveRecorder class. I did not have time to check it, so if you find errors in it, please discard the changes or let me know what needs to be changed. https://github.com/sami1971/SimplyMobile/blob/master/Core/SimplyMobile.Media/Audio/WaveRecorder.cs

+2
source

Source: https://habr.com/ru/post/1441160/


All Articles