mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 04:57:54 -06:00
Merge pull request #983 from MarekSpodBiedry/issue-974
Scale the timeline waveform by the layer's Audio Levels (#974)
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user