fixes incoming legacy voip stream not being resampled

David Kleingeld created

Change summary

crates/audio/Cargo.toml   | 1 +
crates/audio/src/audio.rs | 1 +
2 files changed, 2 insertions(+)

Detailed changes

crates/audio/Cargo.toml 🔗

@@ -17,6 +17,7 @@ anyhow.workspace = true
 async-tar.workspace = true
 collections.workspace = true
 crossbeam.workspace = true
+denoise = { path = "/home/davidsk/Documents/denoise" }
 gpui.workspace = true
 log.workspace = true
 parking_lot.workspace = true

crates/audio/src/audio.rs 🔗

@@ -224,6 +224,7 @@ impl Audio {
         cx: &mut App,
     ) -> anyhow::Result<()> {
         let (replay_source, source) = source
+            .constant_params(CHANNEL_COUNT, SAMPLE_RATE)
             .automatic_gain_control(1.0, 2.0, 0.0, 5.0)
             .periodic_access(Duration::from_millis(100), move |agc_source| {
                 agc_source.set_enabled(LIVE_SETTINGS.auto_speaker_volume.load(Ordering::Relaxed));