fix(apu): don't spin if ringbuf is full

This commit is contained in:
2021-07-28 16:23:31 -05:00
parent 8724da824e
commit e43cac8041
4 changed files with 31 additions and 31 deletions

View File

@@ -47,6 +47,11 @@ impl<T> SampleProducer<T> {
pub(crate) fn is_full(&self) -> bool {
self.inner.is_full()
}
#[inline]
pub(crate) fn two_available(&self) -> bool {
self.inner.slots() > 2
}
}
impl<T> std::fmt::Debug for SampleProducer<T> {