本文整理汇总了C#中NAudio.Wave.StoppedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# StoppedEventArgs类的具体用法?C# StoppedEventArgs怎么用?C# StoppedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StoppedEventArgs类属于NAudio.Wave命名空间,在下文中一共展示了StoppedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: onRecordingStopped
private void onRecordingStopped(object sender, StoppedEventArgs e)
{
if (waveIn != null)
{
waveIn.Dispose();
waveIn = null;
}
if (waveFileWriter != null)
{
waveFileWriter.Close();
waveFileWriter = null;
}
if (e.Exception != null)
{
MessageBox.Show(String.Format("录音出现问题 {0}", e.Exception.Message));
}
}
开发者ID:swnhieian,项目名称:Keyboard,代码行数:17,代码来源:Log.cs
示例17: WaveOutDeviceOnPlaybackStopped
private void WaveOutDeviceOnPlaybackStopped(object sender, StoppedEventArgs stoppedEventArgs)
{
if (nextStopIsRequested)
{
nextStopIsRequested = false;
return;
}
audioFileReader.CurrentTime = TimeSpan.Zero;
if (stoppedEventArgs.Exception == null)
{
TrackFinished?.Invoke(this, new EventArgs());
}
OnPropertyChanged(nameof(PlayState));
}
开发者ID:michd,项目名称:Sharpler,代码行数:17,代码来源:TrackPlayer.cs
示例18: wave_source_RecordingStopped
private void wave_source_RecordingStopped(object sender, StoppedEventArgs e)
{
Console.WriteLine("Recording stopped");
}
开发者ID:kstaruch,项目名称:Toxy,代码行数:4,代码来源:ToxCall.cs
示例19: waveOut_PlaybackStopped
void waveOut_PlaybackStopped(object sender, StoppedEventArgs e)
{
waveOut.Dispose();
reader.Dispose();
}
开发者ID:adamvan101,项目名称:DrumKitMachine,代码行数:5,代码来源:DrumViewModel.cs
示例20: PlayerOnPlaybackStopped
private void PlayerOnPlaybackStopped(object sender, StoppedEventArgs stoppedEventArgs)
{
LoadCommand.IsEnabled = true;
StopCommand.IsEnabled = false;
PauseCommand.IsEnabled = false;
if (reader != null)
{
reader.Position = 0;
}
}
开发者ID:ActivePHOENiX,项目名称:NAudio,代码行数:10,代码来源:MainPageViewModel.cs
注:本文中的NAudio.Wave.StoppedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论