summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-04 00:39:00 +0000
committerDavid Robillard <d@drobilla.net>2007-07-04 00:39:00 +0000
commit2177f008411821e7bce9ca3c306ec64c70b1c58e (patch)
tree79b2f1827163aa40fdde34c5f9b89f7bd1eb3d49 /libs
parente0f287045eff5b6f0581b741a3005f54d6578737 (diff)
Add AutomationControl::parameter() for terseness.
Future-proof automation track GUI 'extra' XML (<GUI><AutomationChild automation-id="gain"> instead of <GUI><gain> so Parameter.to_string isn't used as an XML node name). Fix automation track controller bar shown/hidden state. Fix automation track initial show bug. git-svn-id: svn://localhost/ardour2/trunk@2103 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/automation_control.h3
-rw-r--r--libs/ardour/ardour/midi_buffer.h2
-rw-r--r--libs/ardour/audiofilesource.cc6
-rw-r--r--libs/ardour/automatable.cc2
-rw-r--r--libs/ardour/automation_control.cc6
-rw-r--r--libs/ardour/automation_event.cc8
-rw-r--r--libs/ardour/location.cc2
-rw-r--r--libs/ardour/plugin_insert.cc2
-rw-r--r--libs/ardour/session_state.cc2
-rw-r--r--libs/ardour/session_timefx.cc2
10 files changed, 23 insertions, 12 deletions
diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h
index 5810ced9f9..cc0aee5326 100644
--- a/libs/ardour/ardour/automation_control.h
+++ b/libs/ardour/ardour/automation_control.h
@@ -23,6 +23,7 @@
#include <boost/shared_ptr.hpp>
#include <pbd/controllable.h>
+#include <ardour/parameter.h>
namespace ARDOUR {
@@ -47,6 +48,8 @@ public:
boost::shared_ptr<ARDOUR::AutomationList> list() { return _list; }
boost::shared_ptr<const ARDOUR::AutomationList> list() const { return _list; }
+ Parameter parameter() const;
+
protected:
ARDOUR::Session& _session;
boost::shared_ptr<ARDOUR::AutomationList> _list;
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index ecb48d9da9..f7223fcecd 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -54,6 +54,8 @@ private:
* (_size * MAX_EVENT_SIZE)
*/
+ /* FIXME: this is utter crap. rewrite as a flat/packed buffer like MidiRingBuffer */
+
MidiEvent* _events; ///< Event structs that point to offsets in _data
Byte* _data; ///< MIDI, straight up. No time stamps.
};
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index 4bbe28e251..140f787901 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -228,7 +228,7 @@ AudioFileSource::set_state (const XMLNode& node)
}
if ((prop = node.property (X_("channel"))) != 0) {
- _channel = atoi (prop->value());
+ _channel = atoi (prop->value().c_str());
} else {
_channel = 0;
}
@@ -433,7 +433,7 @@ AudioFileSource::find (ustring& pathstr, bool must_exist, bool& isnew, uint16_t&
fullpath += shorter;
if (Glib::file_test (pathstr, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) {
- chan = atoi (pathstr.substr (pos+1));
+ chan = atoi (pathstr.substr (pos+1).c_str());
pathstr = shorter;
keeppath = fullpath;
++cnt;
@@ -485,7 +485,7 @@ AudioFileSource::find (ustring& pathstr, bool must_exist, bool& isnew, uint16_t&
ustring shorter = pathstr.substr (0, pos);
if (Glib::file_test (shorter, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) {
- chan = atoi (pathstr.substr (pos+1));
+ chan = atoi (pathstr.substr (pos+1).c_str());
pathstr = shorter;
}
}
diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc
index 4ca85a673c..14bccba056 100644
--- a/libs/ardour/automatable.cc
+++ b/libs/ardour/automatable.cc
@@ -121,7 +121,7 @@ Automatable::load_automation (const string& path)
void
Automatable::add_control(boost::shared_ptr<AutomationControl> ac)
{
- Parameter param = ac->list()->parameter();
+ Parameter param = ac->parameter();
_controls[param] = ac;
diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc
index 3ddf4172e8..bbeec65669 100644
--- a/libs/ardour/automation_control.cc
+++ b/libs/ardour/automation_control.cc
@@ -83,3 +83,9 @@ AutomationControl::set_list(boost::shared_ptr<ARDOUR::AutomationList> list)
Changed(); /* EMIT SIGNAL */
}
+
+Parameter
+AutomationControl::parameter() const
+{
+ return _list->parameter();
+}
diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc
index 6fc24c7960..b7a4bc0399 100644
--- a/libs/ardour/automation_event.cc
+++ b/libs/ardour/automation_event.cc
@@ -1374,7 +1374,7 @@ AutomationList::set_state (const XMLNode& node)
}
if ((prop = node.property (X_("default"))) != 0){
- _default_value = atof (prop->value());
+ _default_value = atof (prop->value().c_str());
} else {
_default_value = 0.0;
}
@@ -1392,19 +1392,19 @@ AutomationList::set_state (const XMLNode& node)
}
if ((prop = node.property (X_("min_yval"))) != 0) {
- _min_yval = atof (prop->value ());
+ _min_yval = atof (prop->value ().c_str());
} else {
_min_yval = FLT_MIN;
}
if ((prop = node.property (X_("max_yval"))) != 0) {
- _max_yval = atof (prop->value ());
+ _max_yval = atof (prop->value ().c_str());
} else {
_max_yval = FLT_MAX;
}
if ((prop = node.property (X_("max_xval"))) != 0) {
- _max_xval = atof (prop->value ());
+ _max_xval = atof (prop->value ().c_str());
} else {
_max_xval = 0; // means "no limit ;
}
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index 3d04c66824..bd9e7b8af5 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -422,7 +422,7 @@ Locations::next_available_name(string& result,string base)
location =* i;
temp = location->name();
if (l && !temp.find(base,0)) {
- suffix = atoi(temp.substr(l,3));
+ suffix = atoi(temp.substr(l,3).c_str());
if (suffix) available[suffix] = false;
}
}
diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc
index 31436254c5..1859c5405f 100644
--- a/libs/ardour/plugin_insert.cc
+++ b/libs/ardour/plugin_insert.cc
@@ -279,7 +279,7 @@ PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t off
boost::shared_ptr<AutomationControl> c = li->second;
- if (c->list()->parameter().type() == PluginAutomation && c->list()->automation_playback()) {
+ if (c->parameter().type() == PluginAutomation && c->list()->automation_playback()) {
bool valid;
const float val = c->list()->rt_safe_eval (now, valid);
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 2924210e0c..94aae01a53 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -707,7 +707,7 @@ Session::load_state (string snapshot_name)
is_old = true;
} else {
int major_version;
- major_version = atoi (prop->value()); // grab just the first number before the period
+ major_version = atoi (prop->value().c_str()); // grab just the first number before the period
if (major_version < 2) {
is_old = true;
}
diff --git a/libs/ardour/session_timefx.cc b/libs/ardour/session_timefx.cc
index 4061b2ccd0..aac77a59c7 100644
--- a/libs/ardour/session_timefx.cc
+++ b/libs/ardour/session_timefx.cc
@@ -192,7 +192,7 @@ Session::tempoize_region (TimeStretchRequest& tsr)
} else {
if (tsr.region->name()[len] == 't') {
- c = atoi (tsr.region->name().substr(len+1));
+ c = atoi (tsr.region->name().substr(len+1).c_str());
snprintf (buf, sizeof (buf), "t%03d", ++c);
region_name = tsr.region->name().substr (0, len) + buf;