version 1.104, 2022/03/15 05:53:37 |
version 1.105, 2022/04/29 09:12:57 |
|
|
* check if the device is actually used. If it isn't, |
* check if the device is actually used. If it isn't, |
* then close it |
* then close it |
*/ |
*/ |
if (d->slot_list == NULL && (mtc_array[0].dev != d || |
if (d->slot_list == NULL && d->idle >= d->bufsz && |
mtc_array[0].tstate != MTC_RUN)) { |
(mtc_array[0].dev != d || mtc_array[0].tstate != MTC_RUN)) { |
if (log_level >= 2) { |
if (log_level >= 2) { |
dev_log(d); |
dev_log(d); |
log_puts(": device stopped\n"); |
log_puts(": device stopped\n"); |
|
|
log_puts("\n"); |
log_puts("\n"); |
} |
} |
#endif |
#endif |
|
d->idle = 0; |
|
|
/* |
/* |
* skip cycles for XRUN_SYNC correction |
* skip cycles for XRUN_SYNC correction |
*/ |
*/ |
|
|
|
|
d->delta += delta; |
d->delta += delta; |
|
|
|
if (d->slot_list == NULL) |
|
d->idle += delta; |
|
|
for (s = d->slot_list; s != NULL; s = snext) { |
for (s = d->slot_list; s != NULL; s = snext) { |
/* |
/* |
* s->ops->onmove() may remove the slot |
* s->ops->onmove() may remove the slot |
|
|
} else { |
} else { |
d->prime = 0; |
d->prime = 0; |
} |
} |
|
d->idle = 0; |
d->poffs = 0; |
d->poffs = 0; |
|
|
/* |
/* |