chore: refine client/server mod

This commit is contained in:
Del Wang
2026-01-03 19:17:13 +08:00
parent c4f7fbec6d
commit 34924fa06e
10 changed files with 832 additions and 342 deletions
+9 -1
View File
@@ -1,6 +1,14 @@
use xiao::app::client::Client;
#[cfg(target_os = "linux")]
use std::sync::Arc;
#[cfg(target_os = "linux")]
use xiao::app::client::Client;
#[cfg(not(target_os = "linux"))]
fn main() {
println!("This client only works on Linux due to ALSA dependencies.");
}
#[cfg(target_os = "linux")]
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = Arc::new(Client::new());
+1 -1
View File
@@ -35,7 +35,7 @@ async fn main() -> anyhow::Result<()> {
tokio::time::sleep(std::time::Duration::from_secs(12)).await;
println!("3. Testing Audio Playback (from temp/test.wav)...");
server.start_play(addr).await?;
server.start_play(addr, "temp/test.wav").await?;
break;
}