diff --git a/gb-emu/src/audio.rs b/gb-emu/src/audio.rs index 2a05763..0cef9c5 100644 --- a/gb-emu/src/audio.rs +++ b/gb-emu/src/audio.rs @@ -15,13 +15,9 @@ pub fn create_output(muted: bool) -> (AudioOutput, Stream) { .default_output_device() .expect("no output device available"); - let mut supported_configs_range = device - .supported_output_configs() - .expect("error while querying configs"); - let config = supported_configs_range - .next() - .expect("no supported config?!") - .with_max_sample_rate(); + let config = device + .default_output_config() + .expect("Couldn't get default config for audio output"); let sample_rate = config.sample_rate().0;