From 58f3d97b90e115904800c6e3f4b38bf28d83b1d6 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 12 Nov 2006 00:47:50 +0000 Subject: IO objects with no inputs have fixed, defined peak input power (-inf) git-svn-id: svn://localhost/ardour2/trunk@1114 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/io.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index 3090e21310..eb332398da 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -188,7 +188,9 @@ class IO : public PBD::StatefulDestructible /* Peak metering */ float peak_input_power (uint32_t n) { - if (n < std::max (_ninputs, _noutputs)) { + if (_ninputs == 0) { + return minus_infinity(); + } else if (n < std::max (_ninputs, _noutputs)) { return _visible_peak_power[n]; } else { return minus_infinity(); -- cgit v1.2.3