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();
↧
how to recored genrated beep sound in Xamarin.forms?
↧