mirror of
https://github.com/RustAudio/rodio
synced 2025-01-05 16:28:44 +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]
|
[package]
|
||||||
name = "rodio"
|
name = "rodio"
|
||||||
version = "0.1.5"
|
version = "0.1.6"
|
||||||
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
authors = ["Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
description = "Audio playback library"
|
description = "Audio playback library"
|
||||||
|
|
|
@ -20,7 +20,7 @@ impl Sample for u16 {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn amplify(self, value: f32) -> u16 {
|
fn amplify(self, value: f32) -> u16 {
|
||||||
((self as f32) * value) as u16
|
self.to_i16().amplify(value).to_u16()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Reference in a new issue