Browse Source

Merge pull request #300 from fryshorts/audio-perf

libobs: Replace fmaxf with inline comparison.
Jim 11 years ago
parent
commit
b3312a7657
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/obs-source.c

+ 1 - 1
libobs/obs-source.c

@@ -655,7 +655,7 @@ static void calc_volume_levels(struct obs_source *source, float *array,
 		float val_pow2 = val * val;
 
 		sum_val += val_pow2;
-		max_val  = fmaxf(max_val, val_pow2);
+		max_val  = (max_val > val_pow2) ? max_val : val_pow2;
 	}
 
 	/*