diff --git a/src/main.rs b/src/main.rs index 7765c02..4cf4363 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,12 +10,8 @@ use cpal::traits::HostTrait; use tracing::{trace}; -use tracing_subscriber::layer::SubscriberExt; - use tokio::sync::mpsc::{channel, unbounded_channel}; -//use ringbuf:: - mod audio_receiver; use crate::audio_receiver::audio_receiver_main; @@ -24,12 +20,6 @@ use crate::audio_transmitter::audio_transmitter_main; mod dsp_common; -mod dsp_inb; -use crate::dsp_inb::dsp_inb_main; - -//mod dsp_outb; -//use crate::dsp_outb::dsp_outb_main; - mod tap_junction; use crate::tap_junction::tap_junction_main; @@ -40,8 +30,6 @@ mod wire_fmt; #[tokio::main] async fn main() -> Result<()> { - //simple_logger::init_with_level(tracing::Level::Trace) - // .expect("logger init failure???"); tracing_subscriber::fmt::init(); let cpal_host = cpal::default_host(); @@ -52,11 +40,8 @@ async fn main() -> Result<()> { "no audio output could be found; is a sound card installed?" )?; - let (tx_for_demod, rx_for_demod) = channel::>(1024); let (tx_for_eth_inb, rx_for_eth_inb) = channel::>(8192); - //let (tx_for_mod, rx_for_mod) = channel::(1024); let (tx_for_mod, rx_for_mod) = channel::(8192); - //let (tx_for_wire, rx_for_wire) = channel::(256); let (tx_sample_rate_notify, rx_sample_rate_notify) = tokio::sync::oneshot::channel::(); @@ -67,18 +52,10 @@ async fn main() -> Result<()> { let mut tasks = tokio::task::JoinSet::new(); - //let task_dsp_inb = tasks.spawn(async move { - // trace!("starting inbound audio demodulator"); - // dsp_inb_main(tx_for_eth_inb, rx_for_demod).await - //}); let task_tap_junction = tasks.spawn(async move { trace!("Starting tap manager"); tap_junction_main(tx_for_mod, rx_for_eth_inb).await }); - //let task_dsp_outb = tasks.spawn(async move { - // trace!("Starting outbound audio modulator"); - // dsp_outb_main(tx_for_wire, rx_for_mod, rx_sample_rate_notify).await - //}); trace!("Starting audio sender"); let audio_out_stream = audio_transmitter_main(rx_for_mod, tx_sample_rate_notify, &cpal_output) .context("transmitter for audio on wire has failed to start")?;