use default audio output config instead of trying to use maximum sample rate
This commit is contained in:
parent
9681706516
commit
1a01075ec9
1 changed files with 3 additions and 7 deletions
|
@ -15,13 +15,9 @@ pub fn create_output(muted: bool) -> (AudioOutput, Stream) {
|
||||||
.default_output_device()
|
.default_output_device()
|
||||||
.expect("no output device available");
|
.expect("no output device available");
|
||||||
|
|
||||||
let mut supported_configs_range = device
|
let config = device
|
||||||
.supported_output_configs()
|
.default_output_config()
|
||||||
.expect("error while querying configs");
|
.expect("Couldn't get default config for audio output");
|
||||||
let config = supported_configs_range
|
|
||||||
.next()
|
|
||||||
.expect("no supported config?!")
|
|
||||||
.with_max_sample_rate();
|
|
||||||
|
|
||||||
let sample_rate = config.sample_rate().0;
|
let sample_rate = config.sample_rate().0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue