This commit is contained in:
2026-06-07 17:45:08 +02:00
parent 7d80d26bbd
commit 3dd9620cca
7 changed files with 133 additions and 77 deletions
+15
View File
@@ -206,6 +206,21 @@ func (r *Recorder) BeginQSO() {
r.active = true
}
// RestartQSO begins a fresh accumulation even if one is already active —
// re-seeding from the pre-roll ring. Used when the target QSO changes (a new
// call+freq from a clicked spot or an external app) so the previous take is
// dropped and a new one starts from the pre-roll, rather than continuing to
// accumulate the old contact.
func (r *Recorder) RestartQSO() {
r.mu.Lock()
defer r.mu.Unlock()
if !r.running {
return
}
r.acc = append([]int16(nil), r.ring...)
r.active = true
}
// SaveQSO writes the accumulated recording to path as a WAV and stops
// accumulating. Returns an error if no recording was active.
func (r *Recorder) SaveQSO(path string) error {