X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd%2Fcontrollable.h;h=d9cd21d28dc24e3a455f2d8801793686b2fed9b9;hb=a1a8794dadc0ab972f441481594b53117df1ca92;hp=9c059e9401c81ce7f077990c040f627cab8bfd04;hpb=05cc0f0db798523cb8c760d8a3f73ae47753f39a;p=ardour.git diff --git a/libs/pbd/pbd/controllable.h b/libs/pbd/pbd/controllable.h index 9c059e9401..d9cd21d28d 100644 --- a/libs/pbd/pbd/controllable.h +++ b/libs/pbd/pbd/controllable.h @@ -25,7 +25,7 @@ #include #include "pbd/signals.h" -#include +#include #include "pbd/statefuldestructible.h" @@ -44,17 +44,24 @@ class Controllable : public PBD::StatefulDestructible { virtual ~Controllable() { Destroyed (this); } /* We express Controllable values in one of three ways: - * 1. `user' --- as presented to the user (e.g. dB, Hz etc.) - * 2. `UI' --- as used in some cases for the internal representation - * of the UI. This may be the same as `user', or may be something - * like the natural log of frequency in order that sliders operate - * in a logarithmic fashion. - * 3. `plugin' --- as passed to a plugin. + * 1. `user' --- as presented to the user (e.g. dB, Hz, etc.) + * 2. `interface' --- as used in some cases for the UI representation + * (in order to make controls behave logarithmically). + * 3. `internal' --- as passed to a processor, track, plugin, or whatever. + * + * Note that in some cases user and processor may be the same + * (and interface different) e.g. frequency, which is presented + * to the user and passed to the processor in linear terms, but + * which needs log scaling in the interface. + * + * In other cases, user and interface may be the same (and processor different) + * e.g. gain, which is presented to the user in log terms (dB) + * but passed to the processor as a linear quantity. */ - /** Set `user' value */ + /** Set `internal' value */ virtual void set_value (double) = 0; - /** @return `user' value */ + /** @return `internal' value */ virtual double get_value (void) const = 0; PBD::Signal0 LearningFinished; @@ -98,7 +105,7 @@ class Controllable : public PBD::StatefulDestructible { static void remove (Controllable*); typedef std::set Controllables; - static Glib::StaticRWLock registry_lock; + static Glib::Threads::RWLock registry_lock; static Controllables registry; };