From 2172700144a1b9d13c87bceb5be60f7632f640c4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 29 Aug 2013 17:36:52 +0200 Subject: protect meters against weird float values --- libs/ardour/iec2ppmdsp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/ardour/iec2ppmdsp.cc') diff --git a/libs/ardour/iec2ppmdsp.cc b/libs/ardour/iec2ppmdsp.cc index 76862cccd2..bb934166fc 100644 --- a/libs/ardour/iec2ppmdsp.cc +++ b/libs/ardour/iec2ppmdsp.cc @@ -45,8 +45,8 @@ void Iec2ppmdsp::process (float *p, int n) { float z1, z2, m, t; - z1 = _z1; - z2 = _z2; + z1 = _z1 > 20 ? 20 : (_z1 < 0 ? 0 : _z1); + z1 = _z2 > 20 ? 20 : (_z2 < 0 ? 0 : _z2); m = _res ? 0: _m; _res = false; -- cgit v1.2.3