Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

how to recored genrated beep sound in Xamarin.forms?

$
0
0

I'm currently coding on Xamarin.Forms application with Xamarin.Andriod and I'm using the AudioRecord class to record my genrated beep sound it working good but not working in Ios.below code is Xamarin.Andriod then how to record my genrated beep sound in xamarin.Ios?
foreach (double dVal in sample)
{
short val = (short)(dVal * 32767);
generatedSnd[idx++] = (byte)(val & 0x00ff);
generatedSnd[idx++] = (byte)((val & 0xff00) >> 8);
}
var track = new AudioTrack(Android.Media.Stream.Music, sampleRate, ChannelOut.Mono, Android.Media.Encoding.Pcm16bit, numSamples, AudioTrackMode.Static);
track.Write(generatedSnd, 0, generatedSnd.Length);
track.Play();
SystemClock.Sleep(500);
track.Release();


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>