abundant-alligator-31938
10/30/2024, 4:20 AM// Resample the audio frame
let data_i16 = resampler.remix_and_resample(
&frame.data,
frame.samples_per_channel,
frame.num_channels,
frame.sample_rate,
num_channels,
sample_rate,
);
// Convert i16 samples to f32 before sending to cpal as cpal works with float samples
let data_f32: Vec<f32> = data_i16
.iter()
.map(|&sample| sample as f32 / i16::MAX as f32) // Normalize i16 to f32
.collect();
let _ = sender.send(data_f32).await; // Send the f32 samples to the cpal callback
The main issue is that there is quite a bit of buzz in the sound. Any idea how to fix this? I have a sample app in Flutter, where this low level audio handling is not required and it seems to have perfect audio.
2. The ActiveSpeakersChanged
event seems to be flaky. It immediately goes from a list of one member (when I start speaking) to empty list in an instant.dry-elephant-14928
11/02/2024, 4:47 PMlemon-orange-62769
12/04/2024, 5:49 PM