refactor(tracker): rename trySend to TrySend to make it public

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-04-30 22:00:34 +03:00
parent 0199658025
commit 9f89c37956
9 changed files with 36 additions and 36 deletions

View File

@ -106,7 +106,7 @@ func (s *ScopeModel) ProcessAudioBuffer(bufPtr *sointu.AudioBuffer) {
s.waveForm.WriteOnce(*bufPtr)
}
// chain the messages: when we have a new audio buffer, try passing it on to the detector
if !trySend(s.broker.ToDetector, MsgToDetector{Data: bufPtr}) {
if !TrySend(s.broker.ToDetector, MsgToDetector{Data: bufPtr}) {
s.broker.PutAudioBuffer(bufPtr)
}
}
@ -125,7 +125,7 @@ func (s *ScopeModel) Reset() {
l := len(s.waveForm.Buffer)
s.waveForm.Buffer = s.waveForm.Buffer[:0]
s.waveForm.Buffer = append(s.waveForm.Buffer, make([][2]float32, l)...)
trySend(s.broker.ToDetector, MsgToDetector{Reset: true}) // chain the messages: when the signal analyzer is reset, also reset the detector
TrySend(s.broker.ToDetector, MsgToDetector{Reset: true}) // chain the messages: when the signal analyzer is reset, also reset the detector
}
func (s *ScopeModel) SetBpm(bpm int) {