main: Handle SIGQUIT even if we got samples

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-12-07 17:11:07 +09:00
parent 2c7fd76cec
commit 1773c6425b

View file

@ -281,6 +281,10 @@ fn main() {
warn!("Expected {} samples, got {}", globals.period, read);
}
if sigquit.load(Ordering::Relaxed) {
panic!("SIGQUIT received");
}
let buf_read = &buf[0..read * globals.channels];
let cur_sample_rate = sample_rate_elem.read_int(&ctl);