From eb998b7f6d520dd98463de4f7590db7908f51949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 10 Nov 2026 08:15:46 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20A=20lane's=20loudness=20is=20mea?= =?UTF-8?q?sured=20through=20its=20voice=20processors,=20as=20the=20mix=20?= =?UTF-8?q?plays=20it;=20normalize=20on=20a=20lane=20with=20a=20compressor?= =?UTF-8?q?=20no=20longer=20aims=20at=20the=20dry=20sound?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/engine/src/normalize.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/crates/engine/src/normalize.rs b/crates/engine/src/normalize.rs index 6ecdc81..813aa6b 100644 --- a/crates/engine/src/normalize.rs +++ b/crates/engine/src/normalize.rs @@ -69,7 +69,7 @@ pub fn shifted(l: Loudness, db: f64) -> Loudness { } /// The sound a lane makes from timeline frame `from`, as the engine plays it: -/// clip speeds, equalizers, fades and gaps included. Lane gain is not applied. +/// clip speeds, equalizers, fades, gaps and the lane's voice processors included. Lane gain is not applied. /// `None` when the file set has no audio. pub fn open_lane( s: &PlaybackSession, @@ -93,10 +93,16 @@ pub fn open_lane( .iter() .map(|src| (src.path.clone(), src.audio_stream)) .collect(); - AudioSession::open_multi_streams_speed_at_fade( - &sources, &segs, &eqs, &speeds, &fades, fps, None, - ) - .map_err(|e| format!("reading {}: {e}", lane.label())) + let opened = AudioSession::open_multi_streams_speed_at_fade(&sources, &segs, &eqs, &speeds, &fades, fps, None) + .map_err(|e| format!("reading {}: {e}", lane.label()))?; + let voice = s.lane_voice(lane); + Ok(opened.map(|(meta, rx)| match voice.is_active() { + true => { + let rx = crate::voice::spawn_stage(rx, &voice, meta.sample_rate, usize::from(meta.channels)); + (meta, rx) + } + false => (meta, rx), + })) }