From ad9551e54828f8250dc16cbe0811136aeae1df2a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 23 Aug 2017 19:37:45 +0200 Subject: [PATCH] Update "separate_by_channel" API & add Lua bindings This breaks compilation (GUI) --- libs/ardour/ardour/audioregion.h | 2 +- libs/ardour/ardour/midi_region.h | 2 +- libs/ardour/ardour/region.h | 5 ++--- libs/ardour/audioregion.cc | 2 +- libs/ardour/luabindings.cc | 5 +++++ libs/ardour/midi_region.cc | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index a2c43460ed..205998e4a8 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -153,7 +153,7 @@ class LIBARDOUR_API AudioRegion : public Region void set_envelope_active (bool yn); void set_default_envelope (); - int separate_by_channel (ARDOUR::Session&, std::vector >&) const; + int separate_by_channel (std::vector >&) const; /* automation */ diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index 9039db63d5..36c9125a84 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -97,7 +97,7 @@ class LIBARDOUR_API MidiRegion : public Region XMLNode& state (); int set_state (const XMLNode&, int version); - int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr >&) const; + int separate_by_channel (std::vector< boost::shared_ptr >&) const; /* automation */ diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 33c381df58..c49d8c86cb 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -336,9 +336,8 @@ class LIBARDOUR_API Region bool has_transients () const; - virtual int separate_by_channel (ARDOUR::Session&, - std::vector< boost::shared_ptr >&) const { - return 0; + virtual int separate_by_channel (std::vector< boost::shared_ptr >&) const { + return -1; } void maybe_invalidate_transients (); diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 689b220b81..def7e9dbfb 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1321,7 +1321,7 @@ AudioRegion::recompute_at_start () } int -AudioRegion::separate_by_channel (Session& /*session*/, vector >& v) const +AudioRegion::separate_by_channel (vector >& v) const { SourceList srcs; string new_name; diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 01aca89015..4575e9fbec 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -1210,6 +1210,7 @@ LuaBindings::common (lua_State* L) .addFunction ("scale_amplitude", &AudioRegion::scale_amplitude) .addFunction ("maximum_amplitude", &AudioRegion::maximum_amplitude) .addFunction ("rms", &AudioRegion::rms) + .addRefFunction ("separate_by_channel", &AudioRegion::separate_by_channel) .endClass () .deriveWSPtrClass ("Source") @@ -1538,6 +1539,10 @@ LuaBindings::common (lua_State* L) .beginConstStdList > ("WeakAudioSourceList") .endClass () + // typedef std::vector > RegionVector + .beginStdVector > ("RegionVector") + .endClass () + // typedef std::list > RegionList .beginConstStdList > ("RegionList") .endClass () diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index dc7293f7b5..51b87bdced 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -510,7 +510,7 @@ MidiRegion::recompute_at_start () } int -MidiRegion::separate_by_channel (ARDOUR::Session&, vector< boost::shared_ptr >&) const +MidiRegion::separate_by_channel (vector< boost::shared_ptr >&) const { // TODO return -1;