rgvolume: ignore out-of-range peak values

If the peak value is > 1 (and thus nonsensical) ignore it. Prevents
rgvolume reducing volume to effectively silent on files with bogus peak
values.
This commit is contained in:
Michael Smith 2009-02-27 11:17:50 -08:00
parent 3310a540e3
commit b50452fc37

View file

@ -92,7 +92,7 @@ enum
#define PEAK_FORMAT ".06f"
#define VALID_GAIN(x) ((x) > -60.00 && (x) < 60.00)
#define VALID_PEAK(x) ((x) > 0.)
#define VALID_PEAK(x) ((x) > 0. && (x) < 1.)
/* Same template caps as GstVolume, for I don't like having just ANY caps. */