Rustup
This commit is contained in:
parent
f7c2949549
commit
84326cb4a7
6 changed files with 12 additions and 14 deletions
|
|
@ -83,7 +83,7 @@ impl Sample for i16 {
|
|||
fn to_vec_u16(input: &[i16]) -> Cow<[u16]> {
|
||||
Cow::Owned(input.iter().map(|&value| {
|
||||
if value < 0 {
|
||||
(value + 32767) as u16 + 1
|
||||
(value + 32767 + 1) as u16
|
||||
} else {
|
||||
(value as u16) + 32768
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue