Return correct length of buffer, stub unimpl funcs

This commit is contained in:
Ronald Kinard 2015-09-24 13:19:42 -05:00
parent fd50a113a1
commit 53c5529b16
1 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,6 @@ pub struct Buffer<'a, T: 'a> {
samples_sender: Sender<(Vec<f32>, NumChannels)>, samples_sender: Sender<(Vec<f32>, NumChannels)>,
samples: Vec<T>, samples: Vec<T>,
num_channels: NumChannels, num_channels: NumChannels,
len: usize,
marker: ::std::marker::PhantomData<&'a T>, marker: ::std::marker::PhantomData<&'a T>,
} }
@ -54,7 +53,7 @@ impl<'a, T> Buffer<'a, T> {
#[inline] #[inline]
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
self.len self.samples.len()
} }
#[inline] #[inline]
@ -135,8 +134,7 @@ impl Voice {
samples_sender: self.samples_sender.clone(), samples_sender: self.samples_sender.clone(),
samples: vec![unsafe{ mem::uninitialized() }; buffer_size], samples: vec![unsafe{ mem::uninitialized() }; buffer_size],
num_channels: channels as usize, num_channels: channels as usize,
marker: ::std::marker::PhantomData, marker: ::std::marker::PhantomData
len: 64
} }
} }
} }
@ -152,11 +150,13 @@ impl Voice {
unimplemented!() unimplemented!()
} }
#[inline]
pub fn get_pending_samples(&self) -> usize { pub fn get_pending_samples(&self) -> usize {
0 unimplemented!()
} }
#[inline]
pub fn underflowed(&self) -> bool { pub fn underflowed(&self) -> bool {
false unimplemented!()
} }
} }