private void OnPacketTime(object state) { if (this.method == null || this.currentEvent == null) { // TODO: send mute data here return; } if (this.currentEvent.IsValid()) { var data = this.currentEvent.GetData(this.watch.ElapsedMilliseconds); this.method.Invoke(data); } else { this.currentEvent = null; } }
private void DataAvailable(object sender, WaveInEventArgs e) { if (this.method == null) { return; } if (this.currentEvent == null) { this.method.Invoke(new RtpPayload(e.Buffer, (short)Interlocked.Increment(ref this.sequenceNumber), 0xFA, this.watcher.ElapsedMilliseconds, false)); return; } if (this.currentEvent.IsValid()) { var data = this.currentEvent.GetData(this.watcher.ElapsedMilliseconds); this.method.Invoke(data); } else { this.currentEvent = null; } }
public void PlayDtmf(Digit digit, int duration) { this.currentEvent = new RtpEvent(digit, duration, (short)Interlocked.Increment(ref this.sequenceNumber), 0xFA); //this.currentEventDuration = duration; throw new NotImplementedException(); }
public void PlayDtmf(Digit digit, int duration) { this.currentEvent = new RtpEvent(digit, duration, (short)Interlocked.Increment(ref this.sequenceNumber), 0xFA); }