Update "separate_by_channel" API & add Lua bindings

This breaks compilation (GUI)
This commit is contained in:
Robin Gareus 2017-08-23 19:37:45 +02:00
parent 6f0dec2bd8
commit ad9551e548
6 changed files with 11 additions and 7 deletions

View File

@ -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<boost::shared_ptr<Region> >&) const;
int separate_by_channel (std::vector<boost::shared_ptr<Region> >&) const;
/* automation */

View File

@ -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<Region> >&) const;
int separate_by_channel (std::vector< boost::shared_ptr<Region> >&) const;
/* automation */

View File

@ -336,9 +336,8 @@ class LIBARDOUR_API Region
bool has_transients () const;
virtual int separate_by_channel (ARDOUR::Session&,
std::vector< boost::shared_ptr<Region> >&) const {
return 0;
virtual int separate_by_channel (std::vector< boost::shared_ptr<Region> >&) const {
return -1;
}
void maybe_invalidate_transients ();

View File

@ -1321,7 +1321,7 @@ AudioRegion::recompute_at_start ()
}
int
AudioRegion::separate_by_channel (Session& /*session*/, vector<boost::shared_ptr<Region> >& v) const
AudioRegion::separate_by_channel (vector<boost::shared_ptr<Region> >& v) const
{
SourceList srcs;
string new_name;

View File

@ -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, SessionObject> ("Source")
@ -1538,6 +1539,10 @@ LuaBindings::common (lua_State* L)
.beginConstStdList <boost::weak_ptr<AudioSource> > ("WeakAudioSourceList")
.endClass ()
// typedef std::vector<boost::shared_ptr<Region> > RegionVector
.beginStdVector <boost::shared_ptr<Region> > ("RegionVector")
.endClass ()
// typedef std::list<boost::shared_ptr<Region> > RegionList
.beginConstStdList <boost::shared_ptr<Region> > ("RegionList")
.endClass ()

View File

@ -510,7 +510,7 @@ MidiRegion::recompute_at_start ()
}
int
MidiRegion::separate_by_channel (ARDOUR::Session&, vector< boost::shared_ptr<Region> >&) const
MidiRegion::separate_by_channel (vector< boost::shared_ptr<Region> >&) const
{
// TODO
return -1;