private void StartPlayback() { EventUtility.SafeFireEvent(NewBarStarted, this, new CurrentBarEventArgs(queuedWaveStream.CurrentPlayingIndex)); wavePlayer = new WaveOut(); queuedWaveStream.ContinuePlayback = true; wavePlayer.Init(queuedWaveStream); wavePlayer.Play(); }
private void QueuedWaveStreamFinishedCurrentStream(object sender, EventArgs e) { if (!Repeat && queuedWaveStream.CurrentPlayingIndex == 1) { Stop(); } else { EventUtility.SafeFireEvent(NewBarStarted, this, new CurrentBarEventArgs(queuedWaveStream.CurrentPlayingIndex)); } }
private void LoadNextStream() { CurrentWavestream.Position = 0; if (CurrentPlayingIndex < streams.Count) { currentPlayingIndex++; } else { CurrentPlayingIndex = 1; } EventUtility.SafeFireEvent(FinishedCurrentStream, this); }