Merge pull request #51 from tomaka/fix-signed
Fix signed/unsigned formats mismatch
This commit is contained in:
commit
7c76613aba
|
@ -33,7 +33,7 @@ fn main() {
|
|||
};
|
||||
|
||||
if let Some(output) = buffer.next() {
|
||||
*output = next_sample as u16;
|
||||
*output = next_sample;
|
||||
data = &data[1..];
|
||||
} else {
|
||||
break;
|
||||
|
|
|
@ -50,7 +50,7 @@ impl Voice {
|
|||
}
|
||||
|
||||
pub fn get_samples_format(&self) -> ::SampleFormat {
|
||||
::SampleFormat::U16
|
||||
::SampleFormat::I16
|
||||
}
|
||||
|
||||
pub fn append_data<'a, T>(&'a mut self, max_elements: usize) -> Buffer<'a, T> where T: Clone {
|
||||
|
|
|
@ -40,7 +40,7 @@ impl Voice {
|
|||
|
||||
pub fn get_samples_format(&self) -> ::SampleFormat {
|
||||
match self.bits_per_sample {
|
||||
16 => ::SampleFormat::U16,
|
||||
16 => ::SampleFormat::I16,
|
||||
_ => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue