Finish rework

This commit is contained in:
Pierre Krieger 2017-10-21 09:30:38 +02:00
parent da515c65ec
commit 8b2fab2673
2 changed files with 4 additions and 3 deletions

View file

@ -10,7 +10,7 @@ documentation = "http://docs.rs/rodio"
[dependencies] [dependencies]
claxon = "0.3.0" claxon = "0.3.0"
cpal = "0.4.0" cpal = "0.5.0"
hound = "1.0.0" hound = "1.0.0"
lazy_static = "0.1.12" lazy_static = "0.1.12"
lewton = "0.5" lewton = "0.5"

View file

@ -146,7 +146,7 @@ fn new_voice(engine: &Arc<Engine>, endpoint: &Endpoint) -> (Arc<dynamic_mixer::D
} }
// Do not go below 44100 if possible. // Do not go below 44100 if possible.
if f1.samples_rate.0 < 44100 { if f1.min_samples_rate.0 < 44100 {
return Some(f2); return Some(f2);
} }
@ -157,7 +157,8 @@ fn new_voice(engine: &Arc<Engine>, endpoint: &Endpoint) -> (Arc<dynamic_mixer::D
Some(f1) Some(f1)
}) })
.expect("The endpoint doesn't support any format!?"); .expect("The endpoint doesn't support any format!?")
.with_max_samples_rate();
let voice_id = engine.events_loop.build_voice(endpoint, &format).unwrap(); let voice_id = engine.events_loop.build_voice(endpoint, &format).unwrap();
let (mixer_tx, mixer_rx) = { let (mixer_tx, mixer_rx) = {