本文整理匯總了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;
}
示例2: OnDataStopped
public void OnDataStopped(object sender, StoppedEventArgs e)
{
if (waveIn != null)
waveIn.Dispose();
if (WFile != null)
WFile.Close();
}
示例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();
}
}
示例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;
}
}
示例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));
}
}
示例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();
}
示例7: RecordingStopped
private void RecordingStopped(object sender, StoppedEventArgs e)
{
isStopping = false;
IsRecording = false;
if (resumeRecording)
{
WaveIn.StartRecording();
resumeRecording = false;
IsRecording = true;
}
}
示例8: waveSource_RecordingStopped
//------------------------------------------------------------------------------------------------------------------------
void waveSource_RecordingStopped(object sender, StoppedEventArgs e)
{
lock (this)
{
if (waveSource != null)
{
waveSource.Dispose();
waveSource = null;
IsActive = false;
}
}
}
示例9: waveSource_RecordingStopped
void waveSource_RecordingStopped(object sender, StoppedEventArgs e)
{
if (Source != null)
{
Source.Dispose();
Source = null;
}
if (File != null)
{
File.Dispose();
File = null;
}
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
}
示例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());
}
示例15: PlayerOnPlaybackStopped
private void PlayerOnPlaybackStopped(object sender, StoppedEventArgs stoppedEventArgs)
{
LoadCommand.IsEnabled = true;
StopCommand.IsEnabled = false;
PauseCommand.IsEnabled = false;
}