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

@ -29,24 +29,6 @@ impl Voice {
new_voice().unwrap()
}
#[inline]
pub fn get_channels(&self) -> ::ChannelsCount {
// TODO: use AudioUnitGetProperty...
2
}
#[inline]
pub fn get_samples_rate(&self) -> ::SamplesRate {
// TODO: use AudioUnitGetProperty...
::SamplesRate(44100)
}
#[inline]
pub fn get_samples_format(&self) -> ::SampleFormat {
// TODO: use AudioUnitGetProperty...
::SampleFormat::F32
}
pub fn append_data<'a, T>(&'a mut self, max_elements: usize) -> Buffer<'a, T> where T: Clone {
// Block until the audio callback is ready for more data.
loop {