chore: 从设备使用默认输出

This commit is contained in:
Del Wang
2025-12-31 22:53:33 +08:00
committed by Del
parent 518436d000
commit fbe64f63dd
-6
View File
@@ -307,7 +307,6 @@ async fn run_slave(role: ChannelRole) -> Result<()> {
channels: 1, channels: 1,
frame_size: 960, frame_size: 960,
bitrate: 32000, bitrate: 32000,
playback_device: "plug:original_default".to_string(),
..AudioConfig::default() ..AudioConfig::default()
}; };
@@ -384,13 +383,8 @@ async fn run_slave(role: ChannelRole) -> Result<()> {
continue; continue;
} }
// 4. 初始化音频并开始播放
setup_alsa_config()?;
let res = run_slave_audio_loop(stream, &config, clock).await; let res = run_slave_audio_loop(stream, &config, clock).await;
cleanup_alsa_config();
if let Err(e) = res { if let Err(e) = res {
eprintln!("从设备音频循环出错: {:?}, 准备重连...", e); eprintln!("从设备音频循环出错: {:?}, 准备重连...", e);
} else { } else {