private void button2_Click(object sender, EventArgs e) { playersForm.StopAll(); if (button2.Enabled) { button2.Enabled = false; waveIn.StopRecording(); while (notEncodedBuffer.Length > bytesPerSegment) { } System.Threading.Thread.Sleep(2 * waveIn.BufferMilliseconds); session.SendGoodbyeFrame(); session.OnRtpPacketReceived -= Session_OnRtpPacketReceived; session = null; button1.Enabled = true; comboBox1.Enabled = true; outputList.Enabled = true; inputList.Enabled = true; label5.Visible = false; button1.ForeColor = Color.Black; button1.BackColor = SystemColors.Control; playersForm.IsEncoding = false; Decoder.Dispose(); } }
public void Dispose() { decoder.Dispose(); }