private void MaximimumCalculated(object sender, MaxSampleEventArgs e) { int index = 0; for (int i = 0; i <= 1; i++) { if (activeMicrophones[i] != null) { if (activeMicrophones[i].aggregator.Equals((MicrophoneSampleAggregator)sender)) { index = i + 1; } } } observer.UpdateVolumeBar(index, Math.Max(e.MaxSample, Math.Abs(e.MinSample))); }
private void MaximimumCalculated(object sender, MaxSampleEventArgs e) { int index = 0; for ( int i = 0; i<=1; i++) { if (activeMicrophones[i] != null) { if (activeMicrophones[i].aggregator.Equals((MicrophoneSampleAggregator)sender)) { index = i + 1; } } } observer.UpdateVolumeBar( index , Math.Max(e.MaxSample, Math.Abs(e.MinSample))); }