當前位置: 首頁>>代碼示例>>C#>>正文


C# Wave.StoppedEventArgs類代碼示例

本文整理匯總了C#中NAudio.Wave.StoppedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# StoppedEventArgs類的具體用法?C# StoppedEventArgs怎麽用?C# StoppedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


StoppedEventArgs類屬於NAudio.Wave命名空間,在下文中一共展示了StoppedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: waveIn_RecordingStopped

 private void waveIn_RecordingStopped(object sender, StoppedEventArgs e)
 {
     waveIn.Dispose();
     waveIn = null;
     writer.Close();
     writer = null;
 }
開發者ID:undecimus,項目名稱:komunikator,代碼行數:7,代碼來源:AudioRecorder.cs

示例2: OnDataStopped

 public void OnDataStopped(object sender, StoppedEventArgs e)
 {
     if (waveIn != null)
         waveIn.Dispose();
     if (WFile != null)
         WFile.Close();
 }
開發者ID:bastrich,項目名稱:SpeechRecognition,代碼行數:7,代碼來源:WaveInput.cs

示例3: OnPlaybackStopped

        private void OnPlaybackStopped(object sender, StoppedEventArgs e)
        {
            if (!CheckAccess())
            {
                Dispatcher.Invoke(() => OnPlaybackStopped(sender, e));
                return;
            }

            try
            {
                _playbackButton.ImageSource = Icons.PlayIcon;
                _timeTextBlock.Text = "00:00 / 00:00";

                if (_waveProvider != null)
                    _waveProvider.CurrentTime = TimeSpan.Zero;

                if (e.Exception != null)
                    UiHelper.ShowError(this, e.Exception);
            }
            catch (Exception ex)
            {
                UiHelper.ShowError(this, ex);
            }
            finally
            {
                _timer.Stop();
            }
        }
開發者ID:kidaa,項目名稱:Pulse,代碼行數:28,代碼來源:UiAudioPlayer.cs

示例4: WaveOut_PlaybackStopped

 private void WaveOut_PlaybackStopped(object sender, StoppedEventArgs e)
 {
     if (sender != null) (sender as WaveOutEvent).Dispose();
     if (reader != null)
     {
         reader.Dispose();
         reader = null;
     }
 }
開發者ID:YsqEvilmax,項目名稱:MPAid,代碼行數:9,代碼來源:NAudioPlayer.cs

示例5: OnRecordingStopped

 static void OnRecordingStopped(object sender, StoppedEventArgs e)
 {
     Cleanup();
     if (e.Exception != null)
     {
         Console.WriteLine(String.Format("A problem was encountered during recording {0}",
                                         e.Exception.Message));
     }
 }
開發者ID:satotakumi,項目名稱:NAudioRecord,代碼行數:9,代碼來源:Program.cs

示例6: loadNextSong

 protected override void loadNextSong(object sender, StoppedEventArgs e)
 {
     getNextSample();
     if (songsUntilNextSample > 1)
         setGUIText(songsUntilNextSample + " songs until sample");
     else
         setGUIText("Sample playing next");
     mainPlayer.sampleDone();
 }
開發者ID:TheDizzler,項目名稱:DJMixer,代碼行數:9,代碼來源:SamplePlayer.cs

示例7: RecordingStopped

 private void RecordingStopped(object sender, StoppedEventArgs e)
 {
     isStopping = false;
     IsRecording = false;
     if (resumeRecording)
     {
         WaveIn.StartRecording();
         resumeRecording = false;
         IsRecording = true;
     }
 }
開發者ID:jishi,項目名稱:Jishi.StreamToSonos,代碼行數:11,代碼來源:AudioStreamHandler.cs

示例8: waveSource_RecordingStopped

 //------------------------------------------------------------------------------------------------------------------------
 void waveSource_RecordingStopped(object sender, StoppedEventArgs e)
 {
     lock (this)
     {
         if (waveSource != null)
         {
             waveSource.Dispose();
             waveSource = null;
             IsActive = false;
         }
     }
 }
開發者ID:yodiwo,項目名稱:plegma,代碼行數:13,代碼來源:Microphone.cs

示例9: waveSource_RecordingStopped

		void waveSource_RecordingStopped(object sender, StoppedEventArgs e)
		{
			if (Source != null)
			{
				Source.Dispose();
				Source = null;
			}

			if (File != null)
			{
				File.Dispose();
				File = null;
			}
		}
開發者ID:Dryabadi,項目名稱:WebMCam,代碼行數:14,代碼來源:Audio_Capture.cs

示例10: loadNextSong

        protected override void loadNextSong(object sender, StoppedEventArgs e)
        {
            Debug.WriteLine("Load next song");
            if (manuallyStopped) {  // this prevents next song from loading when stop button is pressed
                Debug.WriteLine("Manual stop");
                manuallyStopped = false;
                return;
            }

            nextSong = getNextSong();

            if (samplePlayer.ready())
                samplePlayer.playSample();
            else
                playSong();
        }
開發者ID:TheDizzler,項目名稱:DJMixer,代碼行數:16,代碼來源:Player.cs

示例11: OnRecordingStopped

        void OnRecordingStopped(object sender, StoppedEventArgs e)
        {
            if (_writer != null)
            {
                _writer.Close();
                _writer = null;
            }

            if (_waveIn != null)
            {
                _waveIn.Dispose();
                _waveIn = null;
            }
            _isRecording = false;
            if (e.Exception != null)
                throw e.Exception;
        }
開發者ID:kyleballard,項目名稱:AudioRecognizer,代碼行數:17,代碼來源:Recorder.cs

示例12: RecordingStoppedHandler

 void RecordingStoppedHandler(object sender, StoppedEventArgs e)
 {
     if (saveToFile)
     {
         fileWriter.Flush();
         fileWriter.Close();
         fileWriter = null;
     }
     //if (streamWriter != null)
     //{
     //    streamWriter.Dispose();
     //    streamWriter = null;
     //}
     //if (fileStream != null)
     //{
     //    fileStream.Dispose();
     //    fileStream = null;
     //}
     waveIn.DataAvailable -= DataAvailableHandler;
     waveIn.RecordingStopped -= RecordingStoppedHandler;
 }
開發者ID:wangws556,項目名稱:duoduo-chat,代碼行數:21,代碼來源:IRecorder.cs

示例13: OnPlaybackStopped

 void OnPlaybackStopped(object sender, StoppedEventArgs e)
 {
     groupBoxDriverModel.Enabled = true;
     if (e.Exception != null)
     {
         MessageBox.Show(e.Exception.Message, "Playback Device Error");
     }
     if (_waveProvider != null)
     {
         _waveProvider.Position = 0;
     }
 }
開發者ID:kidaa,項目名稱:Pulse,代碼行數:12,代碼來源:AudioPlaybackPanel.cs

示例14: MyWaveOutOnPlaybackStopped

 private void MyWaveOutOnPlaybackStopped(object sender, StoppedEventArgs stoppedEventArgs)
 {
     if (_userStopped) return;
     if (stoppedEventArgs.Exception == null && PlaybackFinished != null) PlaybackFinished(this, new EventArgs());
     else if (PlaybackError != null) PlaybackError(this, new EventArgs());
 }
開發者ID:OronDF343,項目名稱:Sky-Jukebox,代碼行數:6,代碼來源:NAudioPlayer.cs

示例15: PlayerOnPlaybackStopped

 private void PlayerOnPlaybackStopped(object sender, StoppedEventArgs stoppedEventArgs)
 {
     LoadCommand.IsEnabled = true;
     StopCommand.IsEnabled = false;
     PauseCommand.IsEnabled = false;           
 }
開發者ID:KarimLUCCIN,項目名稱:NAudioCustom,代碼行數:6,代碼來源:MainPageViewModel.cs


注:本文中的NAudio.Wave.StoppedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。