fix(tracker): do not close Broker but rather just close the detector

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-11-02 20:45:10 +02:00
parent 943073d0cc
commit 94058c2603
6 changed files with 12 additions and 8 deletions

View File

@ -49,6 +49,7 @@ type (
// which gets executed in the detector goroutine.
MsgToDetector struct {
Reset bool
Quit bool
Data any // TODO: consider using a sum type here, for a bit more type safety. See: https://www.jerf.org/iri/post/2917/
}
)
@ -62,12 +63,6 @@ func NewBroker() *Broker {
}
}
func (b *Broker) Close() {
close(b.ToPlayer)
close(b.ToModel)
close(b.ToDetector)
}
// GetAudioBuffer returns an audio buffer from the buffer pool. The buffer is
// guaranteed to be empty. After using the buffer, it should be returned to the
// pool with PutAudioBuffer.