triggerbox: start using PBD::Property stuff to be able to signal property changes
This commit is contained in:
parent
45eb81e7e8
commit
a8f32b28e1
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#include "pbd/stateful.h"
|
||||
#include "pbd/ringbuffer.h"
|
||||
|
||||
#include "temporal/beats.h"
|
||||
|
@ -43,7 +44,7 @@ class Session;
|
|||
class AudioRegion;
|
||||
class TriggerBox;
|
||||
|
||||
class LIBARDOUR_API Trigger {
|
||||
class LIBARDOUR_API Trigger : public PBD::Stateful {
|
||||
public:
|
||||
Trigger (size_t index);
|
||||
virtual ~Trigger() {}
|
||||
|
@ -93,6 +94,9 @@ class LIBARDOUR_API Trigger {
|
|||
samplepos_t fire_samples;
|
||||
Temporal::Beats fire_beats;
|
||||
|
||||
XMLNode& get_state (void);
|
||||
int set_state (const XMLNode&, int version);
|
||||
|
||||
protected:
|
||||
bool _running;
|
||||
bool _stop_requested;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "ardour/midi_buffer.h"
|
||||
#include "ardour/region_factory.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/session_object.h"
|
||||
#include "ardour/sndfilesource.h"
|
||||
#include "ardour/triggerbox.h"
|
||||
|
||||
|
@ -439,6 +440,18 @@ Trigger::set_launch_style (LaunchStyle l)
|
|||
_launch_style = l;
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
Trigger::get_state (void)
|
||||
{
|
||||
XMLNode* node = new XMLNode (X_("Trigger"));
|
||||
return *node;
|
||||
}
|
||||
|
||||
int
|
||||
Trigger::set_state (const XMLNode&, int version)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void
|
||||
Trigger::set_quantization (Temporal::BBT_Offset const & q)
|
||||
{
|
||||
|
@ -494,6 +507,8 @@ AudioTrigger::set_region (boost::shared_ptr<Region> r)
|
|||
return -1;
|
||||
}
|
||||
|
||||
PropertyChanged (ARDOUR::Properties::name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user