diff --git a/tracker/gioui/specanalyzer.go b/tracker/gioui/specanalyzer.go index 966925e..8e00883 100644 --- a/tracker/gioui/specanalyzer.go +++ b/tracker/gioui/specanalyzer.go @@ -35,13 +35,9 @@ func (s *SpectrumState) Layout(gtx C) D { var chnModeTxt string = "???" switch tracker.SpecChnMode(t.Model.SpecAnChannelsInt().Value()) { case tracker.SpecChnModeCombine: - chnModeTxt = "Combine" + chnModeTxt = "Sum" case tracker.SpecChnModeSeparate: chnModeTxt = "Separate" - case tracker.SpecChnModeLeft: - chnModeTxt = "Left" - case tracker.SpecChnModeRight: - chnModeTxt = "Right" case tracker.SpecChnModeOff: chnModeTxt = "Off" } diff --git a/tracker/spectrum.go b/tracker/spectrum.go index 266bc07..241592d 100644 --- a/tracker/spectrum.go +++ b/tracker/spectrum.go @@ -45,15 +45,14 @@ const ( SpecChnModeOff SpecChnMode = iota // no spectrum analysis is done to save CPU resources SpecChnModeCombine // calculate a single combined spectrum for both channels SpecChnModeSeparate // calculate separate spectrums for left and right channels - SpecChnModeLeft // calculate spectrum only for the left channel - SpecChnModeRight // calculate spectrum only for the right channel NumSpecChnModes ) const ( - SpecSmoothingSlow SpecSmoothing = iota - SpecSmoothingMedium + SpecSmoothingMedium SpecSmoothing = iota SpecSmoothingFast + SpecSmoothingSlow + NumSpecSmoothing ) @@ -142,12 +141,6 @@ func (a *SpecAnalyzer) init(s SpecAnSettings) { func (s *SpecAnalyzer) update(buf sointu.AudioBuffer) *Spectrum { ret := s.broker.GetSpectrum() switch s.settings.ChnMode { - case SpecChnModeLeft: - s.process(buf, 0) - ret[0] = append(ret[0], s.temp.power[0]...) - case SpecChnModeRight: - s.process(buf, 1) - ret[1] = append(ret[1], s.temp.power[1]...) case SpecChnModeSeparate: s.process(buf, 0) s.process(buf, 1) @@ -158,7 +151,6 @@ func (s *SpecAnalyzer) update(buf sointu.AudioBuffer) *Spectrum { s.process(buf, 1) ret[0] = append(ret[0], s.temp.power[0]...) vek32.Add_Inplace(ret[0], s.temp.power[1]) - vek32.MulNumber_Inplace(ret[0], 0.5) } // convert to decibels for c := range 2 {