diff --git a/libobs/obs-source.c b/libobs/obs-source.c index 44e0dc589..6f2e9c30d 100644 --- a/libobs/obs-source.c +++ b/libobs/obs-source.c @@ -565,8 +565,8 @@ static void calc_volume_levels(struct obs_source *source, float *array, max_val = fmaxf(max_val, val_pow2); } - rms_val = to_db(sqrtf(sum_val / (float)count * volume)); - max_val = to_db(sqrtf(max_val * volume)); + rms_val = to_db(sqrtf(sum_val / (float)count) * volume); + max_val = to_db(sqrtf(max_val) * volume); if (max_val > source->vol_max) source->vol_max = max_val;