mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
Label logarithmic plugin controls correctly. Should fix #3767.
git-svn-id: svn://localhost/ardour2/branches/3.0@8832 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
27cbe72d96
commit
825cb4ce18
2 changed files with 22 additions and 0 deletions
|
|
@ -84,6 +84,10 @@ class PluginInsert : public Processor
|
|||
void set_value (double val);
|
||||
double get_value (void) const;
|
||||
XMLNode& get_state();
|
||||
|
||||
bool logarithmic () const {
|
||||
return _logarithmic;
|
||||
}
|
||||
|
||||
private:
|
||||
PluginInsert* _plugin;
|
||||
|
|
@ -113,6 +117,8 @@ class PluginInsert : public Processor
|
|||
return _splitting;
|
||||
}
|
||||
|
||||
std::string value_as_string (boost::shared_ptr<AutomationControl>) const;
|
||||
|
||||
PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered;
|
||||
/** Emitted when the return value of splitting () has changed */
|
||||
PBD::Signal0<void> SplittingChanged;
|
||||
|
|
|
|||
|
|
@ -1164,3 +1164,19 @@ PluginInsert::set_splitting (bool s)
|
|||
_splitting = s;
|
||||
SplittingChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
string
|
||||
PluginInsert::value_as_string (boost::shared_ptr<AutomationControl> ac) const
|
||||
{
|
||||
boost::shared_ptr<PluginControl> pc = boost::dynamic_pointer_cast<PluginControl> (ac);
|
||||
assert (pc);
|
||||
|
||||
stringstream s;
|
||||
if (pc->logarithmic ()) {
|
||||
s << exp (pc->get_value ());
|
||||
} else {
|
||||
s << pc->get_value ();
|
||||
}
|
||||
|
||||
return s.str ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue