Changes for code reviews

This commit is contained in:
Jamie Hardt 2024-08-19 17:15:27 -05:00
parent 59a5b12367
commit a012ac1a48
3 changed files with 5 additions and 4 deletions

View file

@ -18,7 +18,7 @@ minimp3_fixed = { version = "0.5.4", optional = true}
symphonia = { version = "0.5.4", optional = true, default-features = false }
crossbeam-channel = { version = "0.5.8", optional = true }
thiserror = "1.0.49"
rand = {version = "0.8.5", features = ["small_rng"]}
rand = { version = "0.8.5", features = ["small_rng"], optional = true }
[features]
default = ["flac", "vorbis", "wav", "mp3"]
@ -28,6 +28,7 @@ vorbis = ["lewton"]
wav = ["hound"]
mp3 = ["symphonia-mp3"]
minimp3 = ["dep:minimp3_fixed"]
noise = ["rand"]
wasm-bindgen = ["cpal/wasm-bindgen"]
cpal-shared-stdcxx = ["cpal/oboe-shared-stdcxx"]
symphonia-aac = ["symphonia/aac"]

View file

@ -35,7 +35,7 @@ pub use self::spatial::Spatial;
pub use self::speed::Speed;
pub use self::stoppable::Stoppable;
pub use self::take::TakeDuration;
pub use self::test_waveform::{TestWaveform, TestWaveformFunction};
pub use self::test_waveform::{TestWaveform, Function};
pub use self::uniform::UniformSourceIterator;
pub use self::zero::Zero;

View file

@ -1,6 +1,6 @@
use std::time::Duration;
use crate::source::{TestWaveform, TestWaveformFunction};
use crate::source::{TestWaveform, Function};
use crate::Source;
use super::SeekError;
@ -21,7 +21,7 @@ impl SineWave {
pub fn new(freq: f32) -> SineWave {
let sr = cpal::SampleRate(SAMPLE_RATE);
SineWave {
test_sine: TestWaveform::new(sr, freq, TestWaveformFunction::Sine),
test_sine: TestWaveform::new(sr, freq, Function::Sine),
}
}
}