forge
Explore
Log in

Don't you dare go Hollow

🐛 A lane's loudness is measured through its voice processors, as the mix plays it; normalize on a lane with a compressor no longer aims at the dry sound

Browse files at this commit

eb998b7f6d520dd98463de4f7590db7908f51949Ahmet Kaan GümüşParent: 04f9ade
crates/engine/src/normalize.rsmodified+11 -5
@@ -69,7 +69,7 @@ pub fn shifted(l: Loudness, db: f64) -> Loudness {
6969 }
7070
7171 /// The sound a lane makes from timeline frame `from`, as the engine plays it:
72-/// clip speeds, equalizers, fades and gaps included. Lane gain is not applied.
72+/// clip speeds, equalizers, fades, gaps and the lane's voice processors included. Lane gain is not applied.
7373 /// `None` when the file set has no audio.
7474 pub fn open_lane(
7575 s: &PlaybackSession,
@@ -93,10 +93,16 @@ pub fn open_lane(
9393 .iter()
9494 .map(|src| (src.path.clone(), src.audio_stream))
9595 .collect();
96- AudioSession::open_multi_streams_speed_at_fade(
97- &sources, &segs, &eqs, &speeds, &fades, fps, None,
98- )
99- .map_err(|e| format!("reading {}: {e}", lane.label()))
96+ let opened = AudioSession::open_multi_streams_speed_at_fade(&sources, &segs, &eqs, &speeds, &fades, fps, None)
97+ .map_err(|e| format!("reading {}: {e}", lane.label()))?;
98+ let voice = s.lane_voice(lane);
99+ Ok(opened.map(|(meta, rx)| match voice.is_active() {
100+ true => {
101+ let rx = crate::voice::spawn_stage(rx, &voice, meta.sample_rate, usize::from(meta.channels));
102+ (meta, rx)
103+ }
104+ false => (meta, rx),
105+ }))
100106 }
101107
102108