mirror of https://github.com/ericonr/sndio.git
check for missed tick after record cycle completion
This commit is contained in:
parent
e1a4e8daba
commit
cf80edff3e
|
@ -377,6 +377,10 @@ siofile_run(void *arg)
|
||||||
log_puts(": recording, but POLLIN not set\n");
|
log_puts(": recording, but POLLIN not set\n");
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
if (!siofile_rec(f))
|
||||||
|
return;
|
||||||
|
#ifdef DEBUG
|
||||||
if (f->rused < d->round) {
|
if (f->rused < d->round) {
|
||||||
siofile_log(f);
|
siofile_log(f);
|
||||||
log_puts(": missed clock tick, rused = ");
|
log_puts(": missed clock tick, rused = ");
|
||||||
|
@ -386,10 +390,6 @@ siofile_run(void *arg)
|
||||||
log_puts("\n");
|
log_puts("\n");
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (!siofile_rec(f))
|
|
||||||
return;
|
|
||||||
#ifdef DEBUG
|
|
||||||
f->rused -= d->round;
|
f->rused -= d->round;
|
||||||
if (f->rused < 0) {
|
if (f->rused < 0) {
|
||||||
/* rec buffer size is not known */
|
/* rec buffer size is not known */
|
||||||
|
@ -401,14 +401,6 @@ siofile_run(void *arg)
|
||||||
log_puts("\n");
|
log_puts("\n");
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
if (f->rused >= 2 * d->round) {
|
|
||||||
siofile_log(f);
|
|
||||||
log_puts(": rec hw xrun, rused = ");
|
|
||||||
log_puti(f->rused);
|
|
||||||
log_puts("/");
|
|
||||||
log_puti(d->bufsz);
|
|
||||||
log_puts("\n");
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
f->state = STATE_CYCLE;
|
f->state = STATE_CYCLE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue