perf: ⚡ reduced memory consumption
This commit is contained in:
parent
8cad7658ea
commit
d375c9b564
8 changed files with 67 additions and 983 deletions
|
@ -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