diff --git a/playback/src/audio_backend/portaudio.rs b/playback/src/audio_backend/portaudio.rs index 4a07fb53..178c8386 100644 --- a/playback/src/audio_backend/portaudio.rs +++ b/playback/src/audio_backend/portaudio.rs @@ -86,10 +86,13 @@ impl<'a> Open for PortAudioSink<'a> { $sink(None, params, $sample_rate) }}; } + + let sample_rate = sample_rate as f64; + match format { - AudioFormat::F32 => open_sink!(Self::F32, f32, sample_rate as f64), - AudioFormat::S32 => open_sink!(Self::S32, i32, sample_rate as f64), - AudioFormat::S16 => open_sink!(Self::S16, i16, sample_rate as f64), + AudioFormat::F32 => open_sink!(Self::F32, f32, sample_rate), + AudioFormat::S32 => open_sink!(Self::S32, i32, sample_rate), + AudioFormat::S16 => open_sink!(Self::S16, i16, sample_rate), _ => { unimplemented!("PortAudio currently does not support {format:?} output") } diff --git a/src/main.rs b/src/main.rs index 24ab4b3c..95e2f6eb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1562,12 +1562,7 @@ fn get_setup() -> Setup { NORMALISATION_ATTACK_SHORT, &attack, valid_values, - &sample_rate - .normalisation_coefficient_to_duration( - player_default_config.normalisation_attack_cf, - ) - .as_millis() - .to_string(), + "5", ); exit(1); @@ -1595,12 +1590,7 @@ fn get_setup() -> Setup { NORMALISATION_RELEASE_SHORT, &release, valid_values, - &sample_rate - .normalisation_coefficient_to_duration( - player_default_config.normalisation_release_cf, - ) - .as_millis() - .to_string(), + "100", ); exit(1);