projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix code style
[ardour.git]
/
libs
/
ardour
/
ardour
/
monitor_processor.h
diff --git
a/libs/ardour/ardour/monitor_processor.h
b/libs/ardour/ardour/monitor_processor.h
index 33b3e9c366ded42a3b8da233cef04f8d1ba3fff3..63e153e48e29512ab442eca189d0a730c516835e 100644
(file)
--- a/
libs/ardour/ardour/monitor_processor.h
+++ b/
libs/ardour/ardour/monitor_processor.h
@@
-32,6
+32,8
@@
#include "ardour/types.h"
#include "ardour/processor.h"
#include "ardour/types.h"
#include "ardour/processor.h"
+#include "ardour/dB.h"
+
class XMLNode;
namespace ARDOUR {
class XMLNode;
namespace ARDOUR {
@@
-47,15
+49,16
@@
public:
, _value (initial)
, _lower (lower)
, _upper (upper)
, _value (initial)
, _lower (lower)
, _upper (upper)
+ , _normal (initial)
{}
/* Controllable API */
{}
/* 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));
T newval = (T) v;
if (newval != _value) {
_value = std::max (_lower, std::min (_upper, newval));
- Changed
(
); /* EMIT SIGNAL */
+ Changed
(true, gcd
); /* EMIT SIGNAL */
}
}
}
}
@@
-63,15
+66,22
@@
public:
return (float) _value;
}
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 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));
/* "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;
}
}
return *this;
}
@@
-103,6
+113,7
@@
protected:
T _value;
T _lower;
T _upper;
T _value;
T _lower;
T _upper;
+ T _normal;
};
class LIBARDOUR_API MonitorProcessor : public Processor
};
class LIBARDOUR_API MonitorProcessor : public Processor
@@
-113,9
+124,9
@@
public:
bool display_to_user() const;
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
);
+ XMLNode& state ();
int set_state (const XMLNode&, int /* version */);
bool configure_io (ChanCount in, ChanCount out);
int set_state (const XMLNode&, int /* version */);
bool configure_io (ChanCount in, ChanCount out);
@@
-140,6
+151,8
@@
public:
bool dim_all () const;
bool mono () const;
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;
PBD::Signal0<void> Changed;
boost::shared_ptr<PBD::Controllable> channel_cut_control (uint32_t) const;
@@
-184,6
+197,8
@@
private:
std::vector<ChannelRecord*> _channels;
uint32_t solo_cnt;
std::vector<ChannelRecord*> _channels;
uint32_t solo_cnt;
+ bool _monitor_active;
+
/* pointers - created first, but managed by boost::shared_ptr<> */
/* pointers - created first, but managed by boost::shared_ptr<> */
@@
-210,6
+225,7
@@
private:
MPControl<volatile gain_t>& _solo_boost_level;
void allocate_channels (uint32_t);
MPControl<volatile gain_t>& _solo_boost_level;
void allocate_channels (uint32_t);
+ void update_monitor_state ();
};
} /* namespace */
};
} /* namespace */