I am trying to play the mic sound in realtime using soundeffect and audiosink in silverlight 5 but the sound gets chopped up here is the code I used
protected override void OnSamples(long sampleTime, long sampleDuration, byte[] sampleData)
{
try
{
SoundEffect effect = new SoundEffect(sampleData, 8000, AudioChannels.Mono);
effect.Play();
}
catch
{ }
}
Any help or alternatives?