Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed Sep 22, 2024
1 parent b992466 commit 66b6ec7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ required-features = ["recording"]

[dependencies]
# +++ NOSTD DEPENDENCIES +++

biquad = "0.4" # lowpass filter
biquad = { version = "0.4", default-features = false } # lowpass filter
libm = { version = "0.2.8", default-features = false }
log = { version = "0.4", default-features = false }
ringbuffer = "0.15.0"
ringbuffer = { version = "0.15.0", default-features = false }

# +++ STD DEPENDENCIES +++
cpal = { version = "0.15", optional = true }
cpal = { version = "0.15", default-features = false, features = [], optional = true }


[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct OutOfRangeError(f32);
/// range `-i16::MAX..=i16::MAX`.
#[inline]
pub fn f32_sample_to_i16(val: f32) -> Result<i16, OutOfRangeError> {
if val.is_finite() && val.abs() <= 1.0 {
if val.is_finite() && libm::fabsf(val) <= 1.0 {
Ok((val * i16::MAX as f32) as i16)
} else {
Err(OutOfRangeError(val))
Expand Down

0 comments on commit 66b6ec7

Please sign in to comment.