up
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user