Store the format in the public Voice struct

This commit is contained in:
Pierre Krieger 2015-09-22 13:34:06 +02:00
parent 334c22a6f3
commit 8d21f5ff25
5 changed files with 27 additions and 87 deletions

View file

@ -72,21 +72,6 @@ impl Voice {
}
}
#[inline]
pub fn get_channels(&self) -> ::ChannelsCount {
self.num_channels
}
#[inline]
pub fn get_samples_rate(&self) -> ::SamplesRate {
::SamplesRate(44100)
}
#[inline]
pub fn get_samples_format(&self) -> ::SampleFormat {
::SampleFormat::I16
}
pub fn append_data<'a, T>(&'a mut self, max_elements: usize) -> Buffer<'a, T> where T: Clone {
let available = {
let channel = self.channel.lock().unwrap();