X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Flogmeter.h;h=0bbce787b2b55706dfbdaa0de05980e89d9c2cb7;hb=c892bc35c8048514a07499871a23eb94cbd101c0;hp=8d9f0b9d8278701ad86d9662efbbe23350a92a26;hpb=532f6aad4ac79ca15d69deccd18fca90e444c437;p=ardour.git diff --git a/gtk2_ardour/logmeter.h b/gtk2_ardour/logmeter.h index 8d9f0b9d82..0bbce787b2 100644 --- a/gtk2_ardour/logmeter.h +++ b/gtk2_ardour/logmeter.h @@ -1,14 +1,33 @@ +/* + Copyright (C) 2000-2007 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + #ifndef __ardour_gtk_log_meter_h__ #define __ardour_gtk_log_meter_h__ #if 1 -inline float +static inline float _log_meter (float power, double lower_db, double upper_db, double non_linearity) { return (power < lower_db ? 0.0 : pow((power-lower_db)/(upper_db-lower_db), non_linearity)); } -inline float +static inline float alt_log_meter (float power) { return _log_meter (power, -192.0, 0.0, 8.0);