chore: 拆分 bin 入口

This commit is contained in:
Del Wang
2025-12-31 22:53:33 +08:00
committed by Del
parent 3d9d852bda
commit 61ecb07a99
8 changed files with 47 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
use hello::audio::{AudioPlayer, OpusCodec};
use hello::config::AudioConfig;
use anyhow::Result;
// todo 左右声道分发,播放音频
fn main() -> Result<()> {
let config = AudioConfig::default();
let player = AudioPlayer::new(&config)?;
let mut codec = OpusCodec::new(&config)?;
}
+11
View File
@@ -0,0 +1,11 @@
use hello::audio::{OpusCodec};
use hello::config::AudioConfig;
use anyhow::Result;
// todo 向 client 分发左右声道音频数据
fn main() -> Result<()> {
let config = AudioConfig::default();
let mut codec = OpusCodec::new(&config)?;
}
@@ -1,8 +1,5 @@
mod audio;
mod config;
use crate::audio::{AudioPlayer, AudioRecorder, OpusCodec};
use crate::config::AudioConfig;
use hello::audio::{AudioPlayer, AudioRecorder, OpusCodec};
use hello::config::AudioConfig;
use anyhow::Result;
use std::collections::VecDeque;
use std::time::{Duration, Instant};
+4
View File
@@ -0,0 +1,4 @@
pub mod audio;
pub mod config;
pub mod net;
pub mod sync;
+6
View File
@@ -0,0 +1,6 @@
pub mod protocol;
pub mod discovery;
pub use protocol::*;
pub use discovery::*;