#include "ardour/types.h"
#include "ardour/processor.h"
+#include "ardour/dB.h"
+
class XMLNode;
namespace ARDOUR {
, _value (initial)
, _lower (lower)
, _upper (upper)
+ , _normal (initial)
{}
/* Controllable API */
- void set_value (double v) {
+ void set_value (double v, PBD::Controllable::GroupControlDisposition gcd) {
T newval = (T) v;
if (newval != _value) {
_value = std::max (_lower, std::min (_upper, newval));
- Changed(); /* EMIT SIGNAL */
+ Changed (true, gcd); /* EMIT SIGNAL */
}
}
return (float) _value;
}
+ std::string get_user_string () const
+ {
+ char theBuf[32]; sprintf( theBuf, "%3.1f dB", accurate_coefficient_to_dB (get_value()));
+ return std::string(theBuf);
+ }
+
double lower () const { return _lower; }
double upper () const { return _upper; }
+ double normal () const { return _normal; }
/* "access as T" API */
MPControl& operator=(const T& v) {
if (v != _value) {
_value = std::max (_lower, std::min (_upper, v));
- Changed (); /* EMIT SIGNAL */
+ Changed (true, PBD::Controllable::UseGroup); /* EMIT SIGNAL */
}
return *this;
}
T _value;
T _lower;
T _upper;
+ T _normal;
};
class LIBARDOUR_API MonitorProcessor : public Processor
bool display_to_user() const;
- void run (BufferSet& /*bufs*/, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t /*nframes*/, bool /*result_required*/);
+ void run (BufferSet& /*bufs*/, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t /*nframes*/, bool /*result_required*/);
XMLNode& state (bool full);
int set_state (const XMLNode&, int /* version */);
bool dim_all () const;
bool mono () const;
+ bool monitor_active () const { return _monitor_active; }
+
PBD::Signal0<void> Changed;
boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
std::vector<ChannelRecord*> _channels;
uint32_t solo_cnt;
+ bool _monitor_active;
+
/* pointers - created first, but managed by boost::shared_ptr<> */
MPControl<volatile gain_t>& _solo_boost_level;
void allocate_channels (uint32_t);
+ void update_monitor_state ();
};
} /* namespace */