Merge pull request #983 from MarekSpodBiedry/issue-974

Scale the timeline waveform by the layer's Audio Levels (#974)
This commit is contained in:
Brandon Thomas
2026-10-12 05:21:55 -04:00
2 changed files with 33 additions and 3 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ pub fn audible(project: &Project, l: &Layer) -> bool {
})
}
fn db_to_gain(db: f64) -> f32 {
/// Linear gain of an Audio Levels value in dB; -96 dB and below is silence.
pub fn db_to_gain(db: f64) -> f32 {
if db <= -96.0 { 0.0 } else { 10f64.powf(db / 20.0) as f32 }
}