slice-5 (rented transport, FOB half): G711Codec + TrunkSession + trunk_driver + MediaLeg + reflex-on-trunk verification (T1/T3/T4/T5/T7/T8) #19
@@ -94,7 +94,7 @@ impl<P: rutster_media::AudioPipe + Send> TrunkSession<P> {
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use super::*;
|
||||
use rutster_media::{EchoAudioPipe, Reflex, ReflexMetrics, LocalVadReflex};
|
||||
use rutster_media::{EchoAudioPipe, LocalVadReflex, Reflex, ReflexMetrics};
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
/// Build a `TrunkSession<EchoAudioPipe>` with no real brain wiring
|
||||
@@ -107,13 +107,10 @@ pub mod tests {
|
||||
let metrics = ReflexMetrics::new();
|
||||
let reflex = Reflex::new(EchoAudioPipe::new(), advisory_rx, metrics);
|
||||
let wrapped = LocalVadReflex::new(reflex, advisory_tx);
|
||||
let (inbound_tx, inbound_rx) = mpsc::channel(16);
|
||||
let (outbound_tx, outbound_rx) = mpsc::channel(16);
|
||||
let (_inbound_tx, inbound_rx) = mpsc::channel(16);
|
||||
let (outbound_tx, _outbound_rx) = mpsc::channel(16);
|
||||
let channel = Channel::new_inbound();
|
||||
let mut session = TrunkSession::new(channel, wrapped, inbound_rx, outbound_tx, now);
|
||||
// Expose the tx side to the test via a leak into a multi-call test.
|
||||
session.last_idle_rx = now;
|
||||
session
|
||||
TrunkSession::new(channel, wrapped, inbound_rx, outbound_tx, now)
|
||||
}
|
||||
|
||||
/// EchoAudioPipe ownership partner of [`trunk_session_with_echo_pipe`]:
|
||||
|
||||
Reference in New Issue
Block a user