Fix a -Wabsolute-value, use float for gain_t calculation

This commit is contained in:
Robin Gareus 2021-03-17 17:57:01 +01:00
parent 476856a42c
commit ee6e7e8a7e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ Amp::apply_gain (BufferSet& bufs, samplecnt_t sample_rate, samplecnt_t nframes,
Evoral::Event<MidiBuffer::TimeType> ev = *m;
if (ev.is_note_on() || ev.is_note_off()) {
const gain_t scale = fabsf (initial + delta * (ev.time() / (double) nframes));
const gain_t scale = fabsf (initial + delta * (ev.time() / (float) nframes));
if (scale < GAIN_COEFF_SMALL) {
m = mb.erase (m);
continue;