kmatheussen / jack_capture

A program for recording soundfiles with jack
http://www.notam02.no/arkiv/src/
Other
75 stars 28 forks source link

Clear error counts before checking for print #41

Closed Claudenw closed 3 years ago

Claudenw commented 3 years ago

https://github.com/kmatheussen/jack_capture/blob/bd713b3b5f54ae0d653dd19f0901e67f55aac209/jack_capture.c#L1326

I see that jack_capture.c lines 1326 - 1338 sets the disk_erorr, total_overruns and total_xruns to zero and then checks if they are greater than zero to print warning messages.

kmatheussen commented 3 years ago

Yes, something is wrong there. I don't quite understand why these variables should be cleared either. @x42 I think you wrote this code, do you remember why these variables are cleared? It seems related to OSC: https://github.com/kmatheussen/jack_capture/blob/bd713b3b5f54ae0d653dd19f0901e67f55aac209/jack_capture.c#L1356

x42 commented 3 years ago

Yeah looks like a SNAFU.

The code should be changed to print first, then reset the per-file counters.

The total_* variable should probably never be reset, except there's currently no xruns vs. total_xruns distinction. x-runs are relevant per file, not per recording session.

kmatheussen commented 3 years ago

Fixed in d2cb18