Switch to using "opus" and add support for windows

This commit is contained in:
2026-09-26 19:27:29 -06:00
parent 63477d22a6
commit a9f2951bf0
6 changed files with 55 additions and 47 deletions
+2 -3
View File
@@ -1,13 +1,12 @@
use std::io::{stdin, Read};
use crate::tx_thread::TxThread;
use crate::udp_connection::OpusUdpConnection;
use crate::util::{SAMPLE_RATE, SAMPLE_RATE_RAW, STEREO_FRAME_SIZE, ThreadMessage};
use anyhow::Error;
use audiopus::coder::Encoder;
use audiopus::{Application, Bitrate, Channels, Signal};
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait};
use cpal::{BufferSize, FromSample, Host, Sample, SampleRate, StreamConfig};
use log::{error, info};
use opus::{Application, Bitrate, Channels, Encoder, Signal};
use std::io::{Read, stdin};
use std::net::SocketAddr;
use std::sync::mpsc::{Sender, channel};
use std::thread;