chore: refine client/server mod
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user