chore: 拆分 bin 入口
This commit is contained in:
@@ -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)?;
|
||||
|
||||
|
||||
}
|
||||
@@ -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};
|
||||
@@ -0,0 +1,4 @@
|
||||
pub mod audio;
|
||||
pub mod config;
|
||||
pub mod net;
|
||||
pub mod sync;
|
||||
@@ -0,0 +1,6 @@
|
||||
pub mod protocol;
|
||||
pub mod discovery;
|
||||
|
||||
pub use protocol::*;
|
||||
pub use discovery::*;
|
||||
|
||||
Reference in New Issue
Block a user