Skip to content

Commit

Permalink
Temporary fix for empty channels: assign 0 DR value
Browse files Browse the repository at this point in the history
  • Loading branch information
Valérian Sibille committed Oct 21, 2024
1 parent e038993 commit 7b71661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dr_meter/src/dr_meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static double get_dr_dr_meter(dr_meter_t* self, unsigned channel)
double loud_sum2 = get_sum2(self, channel, loud_blocks);
double loud_rms = get_audio_rms(loud_sum2, loud_blocks);
double second_max = true_peak(self->second_peaks[channel]);
double dr = decibels(second_max / loud_rms);
double dr = loud_rms > 0 ? decibels(second_max / loud_rms) : 0;
return dr;
}

Expand Down

0 comments on commit 7b71661

Please sign in to comment.