perf: ⚡ reduced memory consumption
This commit is contained in:
parent
8cad7658ea
commit
d375c9b564
8 changed files with 67 additions and 983 deletions
|
@ -9,4 +9,4 @@ chrono = { workspace = true }
|
|||
tokio = { workspace = true }
|
||||
s2n-quic = { workspace = true }
|
||||
cpal = "0.16.0"
|
||||
iced = { features = ["tokio"], git = "https://github.com/iced-rs/iced", rev = "d39022432c778a8cda455f40b9c12245db86ce45" }
|
||||
iced = { default-features = false , features = ["tokio", "wgpu", "tiny-skia", "fira-sans"], git = "https://github.com/iced-rs/iced", rev = "89f480bdae951a31944302777b759661ec3c3e83" }
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue