Exemple #1
0
        private void MixerInputEnded(object sender, SampleProviderEventArgs e)
        {
            if (State == AudioTrackState.Stopped || _outputSample == null)
            {
                return;
            }

            //check if this is our sample
            if (e.SampleProvider.GetHashCode() == _outputSample.GetHashCode())
            {
                if (_timer != null)
                {
                    _timer.Dispose();
                }

                _currentStream.Dispose();

                State = AudioTrackState.Stopped;
            }
        }