summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-03-21 20:22:00 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-03-21 20:22:00 +0000
commitfec2a96cec0f557cf30dde2f9bf21b76be36551d (patch)
treea1b446d153191d641f36cb30e178e3fc400be495 /libs/ardour
parentaa06f1f9f8be010d4abfc5b5c2fd61ab8e39fa58 (diff)
fix dragging that involves locked regions; auto-rebinding patch for people to experiment with (probably needs a little work)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3164 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/region_factory.h7
-rw-r--r--libs/ardour/ardour/session.h3
-rw-r--r--libs/ardour/region_factory.cc14
-rw-r--r--libs/ardour/session.cc4
4 files changed, 20 insertions, 8 deletions
diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h
index b944202c36..ada5afcd9c 100644
--- a/libs/ardour/ardour/region_factory.h
+++ b/libs/ardour/ardour/region_factory.h
@@ -42,6 +42,12 @@ class RegionFactory {
static sigc::signal<void,boost::shared_ptr<Region> > CheckNewRegion;
+ static boost::shared_ptr<Region> create (boost::shared_ptr<const Region>);
+
+ /* note: both of the first two should use const shared_ptr as well, but
+ gcc 4.1 doesn't seem to be able to disambiguate them if they do.
+ */
+
static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, nframes_t start,
nframes_t length, std::string name,
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
@@ -50,7 +56,6 @@ class RegionFactory {
layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (const SourceList &, nframes_t start, nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
- static boost::shared_ptr<Region> create (boost::shared_ptr<Region>);
static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
static boost::shared_ptr<Region> create (SourceList &, const XMLNode&);
};
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 76590368f8..fa50212f3a 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -249,6 +249,9 @@ class Session : public PBD::StatefulDestructible
bool deletion_in_progress() const { return _state_of_the_state & Deletion; }
sigc::signal<void> DirtyChanged;
+ static sigc::signal<void> AutoBindingOn;
+ static sigc::signal<void> AutoBindingOff;
+
std::string sound_dir (bool with_path = true) const;
std::string peak_dir () const;
std::string dead_sound_dir () const;
diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc
index 5cab802801..163cb07c6c 100644
--- a/libs/ardour/region_factory.cc
+++ b/libs/ardour/region_factory.cc
@@ -35,8 +35,8 @@ sigc::signal<void,boost::shared_ptr<Region> > RegionFactory::CheckNewRegion;
boost::shared_ptr<Region>
RegionFactory::create (boost::shared_ptr<Region> region, nframes_t start,
- nframes_t length, std::string name,
- layer_t layer, Region::Flag flags, bool announce)
+ nframes_t length, std::string name,
+ layer_t layer, Region::Flag flags, bool announce)
{
boost::shared_ptr<const AudioRegion> other;
@@ -57,11 +57,11 @@ RegionFactory::create (boost::shared_ptr<Region> region, nframes_t start,
}
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<Region> region)
+RegionFactory::create (boost::shared_ptr<const Region> region)
{
- boost::shared_ptr<AudioRegion> other;
+ boost::shared_ptr<const AudioRegion> other;
- if ((other = boost::dynamic_pointer_cast<AudioRegion>(region)) != 0) {
+ if ((other = boost::dynamic_pointer_cast<const AudioRegion>(region)) != 0) {
boost::shared_ptr<Region> ret (new AudioRegion (other));
/* pure copy constructor - no CheckNewRegion emitted */
return ret;
@@ -75,8 +75,8 @@ RegionFactory::create (boost::shared_ptr<Region> region)
boost::shared_ptr<Region>
RegionFactory::create (boost::shared_ptr<AudioRegion> region, nframes_t start,
- nframes_t length, std::string name,
- layer_t layer, Region::Flag flags, bool announce)
+ nframes_t length, std::string name,
+ layer_t layer, Region::Flag flags, bool announce)
{
return create (boost::static_pointer_cast<Region> (region), start, length, name, layer, flags, announce);
}
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index d53291b178..d7c3c95d9d 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -113,6 +113,10 @@ sigc::signal<void> Session::SMPTEOffsetChanged;
sigc::signal<void> Session::StartTimeChanged;
sigc::signal<void> Session::EndTimeChanged;
+sigc::signal<void> Session::AutoBindingOn;
+sigc::signal<void> Session::AutoBindingOff;
+
+
int
Session::find_session (string str, string& path, string& snapshot, bool& isnew)
{