Corrected a math mistake in obs_source.c calc_volume_levels.

This commit is contained in:
HomeWorld 2014-07-14 19:24:04 +03:00
parent e03f34de9f
commit 336c3821fc

View File

@ -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;