perf: reduced memory consumption

This commit is contained in:
Ahmet Kaan Gümüş 2025-06-16 02:11:29 +03:00
parent 8cad7658ea
commit d375c9b564
8 changed files with 67 additions and 983 deletions

View file

@ -13,8 +13,8 @@ use tokio::sync::{
use crate::{
ClientConfig, MICROPHONE_BUFFER_LENGHT, SPEAKER_BUFFER_LENGHT,
audio::{play, record},
stream::{connect, disconnect_watcher},
voice::{play, record},
};
#[derive(Debug)]

View file

@ -1,9 +1,9 @@
use protocol::protocol::Speaker;
use tokio::sync::broadcast;
pub mod audio;
pub mod gui;
pub mod stream;
pub mod voice;
const MICROPHONE_BUFFER_LENGHT: usize = 1024 * 4;
const SPEAKER_BUFFER_LENGHT: usize = 1024 * 16 * 16;

View file

@ -90,7 +90,7 @@ pub async fn disconnect_watcher(
println!("Disconnected");
}
#[allow(unused_assignment)]
#[allow(unused_assignments)]
async fn send_signals(
mut send_stream: SendStream,
mut microphone_receiver: broadcast::Receiver<f32>,