remove some redundant comments

This commit is contained in:
TerraMaster85 2024-12-23 15:47:35 -05:00
parent 06343f84ba
commit a9e4916c68

View file

@ -10,12 +10,8 @@ use cpal::traits::HostTrait;
use tracing::{trace}; use tracing::{trace};
use tracing_subscriber::layer::SubscriberExt;
use tokio::sync::mpsc::{channel, unbounded_channel}; use tokio::sync::mpsc::{channel, unbounded_channel};
//use ringbuf::
mod audio_receiver; mod audio_receiver;
use crate::audio_receiver::audio_receiver_main; use crate::audio_receiver::audio_receiver_main;
@ -24,12 +20,6 @@ use crate::audio_transmitter::audio_transmitter_main;
mod dsp_common; 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; mod tap_junction;
use crate::tap_junction::tap_junction_main; use crate::tap_junction::tap_junction_main;
@ -40,8 +30,6 @@ mod wire_fmt;
#[tokio::main] #[tokio::main]
async fn main() -> Result<()> { async fn main() -> Result<()> {
//simple_logger::init_with_level(tracing::Level::Trace)
// .expect("logger init failure???");
tracing_subscriber::fmt::init(); tracing_subscriber::fmt::init();
let cpal_host = cpal::default_host(); 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?" "no audio output could be found; is a sound card installed?"
)?; )?;
let (tx_for_demod, rx_for_demod) = channel::<Vec<f64>>(1024);
let (tx_for_eth_inb, rx_for_eth_inb) = channel::<Vec<u8>>(8192); let (tx_for_eth_inb, rx_for_eth_inb) = channel::<Vec<u8>>(8192);
//let (tx_for_mod, rx_for_mod) = channel::<RawEthFrameMessage>(1024);
let (tx_for_mod, rx_for_mod) = channel::<u8>(8192); let (tx_for_mod, rx_for_mod) = channel::<u8>(8192);
//let (tx_for_wire, rx_for_wire) = channel::<PcmSampleMessage>(256);
let (tx_sample_rate_notify, rx_sample_rate_notify) = let (tx_sample_rate_notify, rx_sample_rate_notify) =
tokio::sync::oneshot::channel::<u32>(); tokio::sync::oneshot::channel::<u32>();
@ -67,18 +52,10 @@ async fn main() -> Result<()> {
let mut tasks = tokio::task::JoinSet::new(); 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 { let task_tap_junction = tasks.spawn(async move {
trace!("Starting tap manager"); trace!("Starting tap manager");
tap_junction_main(tx_for_mod, rx_for_eth_inb).await 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"); trace!("Starting audio sender");
let audio_out_stream = audio_transmitter_main(rx_for_mod, tx_sample_rate_notify, &cpal_output) 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")?; .context("transmitter for audio on wire has failed to start")?;