From b1a1d5babdba49d87931a469e21bf8a0fef36aa0 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Thu, 24 Sep 2015 17:35:51 +0200 Subject: [PATCH] Fix amplify for u16s --- Cargo.toml | 2 +- src/conversions/sample.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 94497b0..12d5bee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rodio" -version = "0.1.5" +version = "0.1.6" authors = ["Pierre Krieger "] license = "Apache-2.0" description = "Audio playback library" diff --git a/src/conversions/sample.rs b/src/conversions/sample.rs index bfc8637..ec1cef1 100644 --- a/src/conversions/sample.rs +++ b/src/conversions/sample.rs @@ -20,7 +20,7 @@ impl Sample for u16 { #[inline] fn amplify(self, value: f32) -> u16 { - ((self as f32) * value) as u16 + self.to_i16().amplify(value).to_u16() } #[inline]