mirror of
https://github.com/RustAudio/rodio
synced 2024-12-13 05:32:32 +00:00
Merge pull request #29 from tomaka/fix-amplify-u16
Fix amplify for u16s
This commit is contained in:
commit
a5c0d6673c
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "rodio"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
description = "Audio playback library"
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue