mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
add a bit of state to VCAManager
This commit is contained in:
parent
4478bdc1d1
commit
bfd0ba7bf3
2 changed files with 25 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#include <glibmm/threads.h>
|
||||
|
||||
#include "pbd/signals.h"
|
||||
#include "pbd/statefuldestructible.h"
|
||||
|
||||
#include "ardour/session_handle.h"
|
||||
#include "ardour/types.h"
|
||||
|
|
@ -36,7 +37,7 @@ namespace ARDOUR {
|
|||
|
||||
class VCA;
|
||||
|
||||
class VCAManager : public SessionHandleRef
|
||||
class VCAManager : public SessionHandleRef, public PBD::StatefulDestructible
|
||||
{
|
||||
public:
|
||||
VCAManager (ARDOUR::Session&);
|
||||
|
|
@ -53,6 +54,11 @@ class VCAManager : public SessionHandleRef
|
|||
PBD::Signal1<void,VCAList&> VCAAdded;
|
||||
PBD::Signal1<void,VCAList&> VCARemoved;
|
||||
|
||||
XMLNode& get_state();
|
||||
int set_state (XMLNode const&, int version);
|
||||
|
||||
static std::string xml_node_name;
|
||||
|
||||
private:
|
||||
mutable Glib::Threads::Mutex lock;
|
||||
VCAS _vcas;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,13 @@
|
|||
#include "ardour/vca.h"
|
||||
#include "ardour/vca_manager.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace Glib::Threads;
|
||||
using std::string;
|
||||
|
||||
string VCAManager::xml_node_name (X_("VCAManager"));
|
||||
|
||||
VCAManager::VCAManager (Session& s)
|
||||
: SessionHandleRef (s)
|
||||
|
|
@ -35,6 +38,8 @@ VCAManager::VCAManager (Session& s)
|
|||
|
||||
VCAManager::~VCAManager ()
|
||||
{
|
||||
Mutex::Lock lm (lock);
|
||||
_vcas.clear ();
|
||||
}
|
||||
|
||||
VCAManager::VCAS
|
||||
|
|
@ -102,3 +107,16 @@ VCAManager::vca_by_number (uint32_t n) const
|
|||
|
||||
return boost::shared_ptr<VCA>();
|
||||
}
|
||||
|
||||
XMLNode&
|
||||
VCAManager::get_state ()
|
||||
{
|
||||
XMLNode* node = new XMLNode (xml_node_name);
|
||||
return *node;
|
||||
}
|
||||
|
||||
int
|
||||
VCAManager::set_state (XMLNode const& node, int /*version*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue