This commit is contained in:
5684185+vsariola@users.noreply.github.com
2026-01-17 14:54:40 +02:00
parent 06a1fb6b52
commit 655d736149
5 changed files with 137 additions and 120 deletions

View File

@ -34,7 +34,7 @@ type (
Octave Model
DetectorWeighting Model
SyntherIndex Model
SpecAnSmoothing Model
SpecAnSpeed Model
SpecAnResolution Model
SpecAnChannelsInt Model
)
@ -86,7 +86,7 @@ func (m *Model) Step() Int { return MakeInt((*Step)(m)) }
func (m *Model) Octave() Int { return MakeInt((*Octave)(m)) }
func (m *Model) DetectorWeighting() Int { return MakeInt((*DetectorWeighting)(m)) }
func (m *Model) SyntherIndex() Int { return MakeInt((*SyntherIndex)(m)) }
func (m *Model) SpecAnSmoothing() Int { return MakeInt((*SpecAnSmoothing)(m)) }
func (m *Model) SpecAnSpeed() Int { return MakeInt((*SpecAnSpeed)(m)) }
func (m *Model) SpecAnResolution() Int { return MakeInt((*SpecAnResolution)(m)) }
func (m *Model) SpecAnChannelsInt() Int { return MakeInt((*SpecAnChannelsInt)(m)) }
@ -158,13 +158,13 @@ func (v *DetectorWeighting) Range() IntRange { return IntRange{0, int(NumLoudnes
// SpecAn stuff
func (v *SpecAnSmoothing) Value() int { return int(v.specAnSettings.Smooth) }
func (v *SpecAnSmoothing) SetValue(value int) bool {
v.specAnSettings.Smooth = SpecSmoothing(value)
func (v *SpecAnSpeed) Value() int { return int(v.specAnSettings.Smooth) }
func (v *SpecAnSpeed) SetValue(value int) bool {
v.specAnSettings.Smooth = value
TrySend(v.broker.ToSpecAn, MsgToSpecAn{HasSettings: true, SpecSettings: v.specAnSettings})
return true
}
func (v *SpecAnSmoothing) Range() IntRange { return IntRange{0, int(NumSpecSmoothing) - 1} }
func (v *SpecAnSpeed) Range() IntRange { return IntRange{SpecSpeedMin, SpecSpeedMax} }
func (v *SpecAnResolution) Value() int { return v.specAnSettings.Resolution }
func (v *SpecAnResolution) SetValue(value int) bool {