
Untitled
By: a guest on
Jul 29th, 2012 | syntax:
None | size: 0.48 KB | hits: 12 | expires: Never
VOIP SIP - Help to encode from PCM to U-law
SoundEffect soundEffect = new SoundEffect(buffer, 8000, AudioChannels.Mono);
SoundEffectInstance soundInstance = soundEffect.CreateInstance();
soundInstance.Play();
public Microphone microphone = Microphone.Default;
private byte[] buffer;
Queue<byte[]> recordedVoice = new Queue<byte[]>();
microphone.GetData(buffer);
recordedVoice.Enqueue(buffer);
byte[] encoded = G711MuLaw.G711MuLawEncode(recordedVoice.Dequeue());