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 {
69 }69 }
70 70
71 /// The sound a lane makes from timeline frame `from`, as the engine plays it:71 /// 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.
73 /// `None` when the file set has no audio.73 /// `None` when the file set has no audio.
74 pub fn open_lane(74 pub fn open_lane(
75 s: &PlaybackSession,75 s: &PlaybackSession,
@@ -93,10 +93,16 @@ pub fn open_lane(
93 .iter()93 .iter()
94 .map(|src| (src.path.clone(), src.audio_stream))94 .map(|src| (src.path.clone(), src.audio_stream))
95 .collect();95 .collect();
96- AudioSession::open_multi_streams_speed_at_fade(96+ let opened = AudioSession::open_multi_streams_speed_at_fade(&sources, &segs, &eqs, &speeds, &fades, fps, None)
97- &sources, &segs, &eqs, &speeds, &fades, fps, None,97+ .map_err(|e| format!("reading {}: {e}", lane.label()))?;
98- )98+ let voice = s.lane_voice(lane);
99- .map_err(|e| format!("reading {}: {e}", lane.label()))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+ }))
100 }106 }
101 107
102 108