Improved buffer management

- ALSA backend: reuse the buffers
- Make `InputBuffer` and `OutputBuffer` types just a wrapper of slice
  * Buffer is now submitted at the end of callback
This commit is contained in:
Tatsuyuki Ishi 2019-04-30 15:43:47 +09:00
parent 0354548426
commit 4d3fe57fe3
7 changed files with 156 additions and 366 deletions

View file

@ -132,31 +132,4 @@ pub struct InputBuffer<'a, T: 'a> {
pub struct OutputBuffer<'a, T: 'a> {
marker: PhantomData<&'a mut T>,
}
impl<'a, T> InputBuffer<'a, T> {
#[inline]
pub fn buffer(&self) -> &[T] {
unimplemented!()
}
#[inline]
pub fn finish(self) {
}
}
impl<'a, T> OutputBuffer<'a, T> {
#[inline]
pub fn buffer(&mut self) -> &mut [T] {
unimplemented!()
}
#[inline]
pub fn len(&self) -> usize {
0
}
#[inline]
pub fn finish(self) {
}
}
}