Ejemplo n.º 1
0
        public void Stop()
        {
            //TODO: we might want to block here until RecordingStopped and PlaybackStopped are fired

            if (wave_source != null)
            {
                wave_source.StopRecording();
                wave_source.Dispose();
            }

            if (wave_out != null)
            {
                wave_out.Stop();
                wave_out.Dispose();
            }

            if (thread != null)
            {
                thread.Abort();
                thread.Join();
            }

            toxav.KillTransmission(CallIndex);
            toxav.Hangup(CallIndex);
        }
Ejemplo n.º 2
0
        public virtual void Stop()
        {
            //TODO: we might want to block here until RecordingStopped and PlaybackStopped are fired

            Ended = true;

            if (wave_source != null)
            {
                try
                {
                    wave_source.StopRecording();
                    wave_source.Dispose();
                }
                catch { }
            }

            if (wave_out != null)
            {
                wave_out.Stop();
                wave_out.Dispose();
            }

            toxav.KillTransmission(callIndex);
            toxav.Hangup(callIndex);

            if (timer != null)
            {
                timer.Dispose();
            }

            if (videoSource != null)
            {
                videoSource.SignalToStop();
                videoSource.NewFrame -= video_source_NewFrame;
                videoSource           = null;
            }
        }