This commit is contained in:
Jamie Hardt 2024-08-04 13:55:53 -07:00
parent e581653578
commit 5056a88b9f
2 changed files with 5 additions and 5 deletions

View file

@ -118,10 +118,6 @@ pub use cpal::{
SupportedStreamConfig,
};
#[cfg(test)]
#[macro_use]
extern crate assert_float_eq;
mod conversions;
mod sink;
mod spatial_sink;
@ -140,3 +136,7 @@ pub use crate::sink::Sink;
pub use crate::source::Source;
pub use crate::spatial_sink::SpatialSink;
pub use crate::stream::{OutputStream, OutputStreamHandle, PlayError, StreamError};
#[cfg(test)]
#[macro_use]
extern crate assert_float_eq;

View file

@ -169,7 +169,7 @@ mod tests {
let source1 = const_source(10, 1.0f32);
let mut faded = linear_gain_ramp(source1, Duration::from_secs(4), 0.0, 1.0, true);
assert_float_absolute_eq!(faded.next().unwrap(), 0.0);
assert_eq!(faded.next(), Some(0.0));
assert_eq!(faded.next(), Some(0.25));
assert_eq!(faded.next(), Some(0.5));
assert_eq!(faded.next(), Some(0.75));