diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-12 00:47:50 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-12 00:47:50 +0000 |
commit | 58f3d97b90e115904800c6e3f4b38bf28d83b1d6 (patch) | |
tree | d7a992d0419b4e22cfb4a348285d8b1eacd4ed5c | |
parent | 568bbb96ef3cfa9094d5067b80d8a455d2520f50 (diff) |
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
-rw-r--r-- | libs/ardour/ardour/io.h | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |