private void RecordingStateListner(RecordingStateEventArgs args) { if (args?.State == RecordingState.Stopped) { LeftChannelPeak = 0; if (RightChannelPeak.HasValue) { RightChannelPeak = 0; } } }
private void RecordingStateListner(RecordingStateEventArgs args) { switch (args.State) { case RecordingState.Started: break; case RecordingState.Stopped: for (var i = 0; i < ChannelData.Count; i++) { RawChannelData[i].SetValue(0); FilteredChannelData[i].SetValue(0); } break; default: throw new ArgumentOutOfRangeException(); } }