expose SessionConfiguration as lua bindings
This commit is contained in:
parent
3b7dbdfeb8
commit
11da4a83e4
@ -1007,6 +1007,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
|||||||
|
|
||||||
SessionConfiguration config;
|
SessionConfiguration config;
|
||||||
|
|
||||||
|
SessionConfiguration* cfg () { return &config; }
|
||||||
|
|
||||||
bool exporting () const {
|
bool exporting () const {
|
||||||
return _exporting;
|
return _exporting;
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,9 @@ CLASSKEYS(ARDOUR::BufferSet);
|
|||||||
CLASSKEYS(ARDOUR::ChanMapping);
|
CLASSKEYS(ARDOUR::ChanMapping);
|
||||||
CLASSKEYS(ARDOUR::DSP::DspShm);
|
CLASSKEYS(ARDOUR::DSP::DspShm);
|
||||||
CLASSKEYS(ARDOUR::LuaTableRef);
|
CLASSKEYS(ARDOUR::LuaTableRef);
|
||||||
|
CLASSKEYS(PBD::Configuration);
|
||||||
|
CLASSKEYS(ARDOUR::PresentationInfo);
|
||||||
|
CLASSKEYS(ARDOUR::SessionConfiguration);
|
||||||
CLASSKEYS(PBD::ID);
|
CLASSKEYS(PBD::ID);
|
||||||
CLASSKEYS(ARDOUR::Location);
|
CLASSKEYS(ARDOUR::Location);
|
||||||
CLASSKEYS(ARDOUR::PluginInfo);
|
CLASSKEYS(ARDOUR::PluginInfo);
|
||||||
@ -276,6 +279,9 @@ LuaBindings::common (lua_State* L)
|
|||||||
.deriveClass <PBD::StatefulDestructible, PBD::Stateful> ("StatefulDestructible")
|
.deriveClass <PBD::StatefulDestructible, PBD::Stateful> ("StatefulDestructible")
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
|
.deriveClass <PBD::Configuration, PBD::Stateful> ("Configuration")
|
||||||
|
.endClass()
|
||||||
|
|
||||||
.deriveWSPtrClass <PBD::StatefulDestructible, PBD::Stateful> ("StatefulDestructiblePtr")
|
.deriveWSPtrClass <PBD::StatefulDestructible, PBD::Stateful> ("StatefulDestructiblePtr")
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
@ -1182,6 +1188,25 @@ LuaBindings::common (lua_State* L)
|
|||||||
.addFunction ("set_buffer_size", &AudioEngine::set_buffer_size)
|
.addFunction ("set_buffer_size", &AudioEngine::set_buffer_size)
|
||||||
.addFunction ("get_last_backend_error", &AudioEngine::get_last_backend_error)
|
.addFunction ("get_last_backend_error", &AudioEngine::get_last_backend_error)
|
||||||
.endClass()
|
.endClass()
|
||||||
|
|
||||||
|
.deriveClass <SessionConfiguration, PBD::Configuration> ("SessionConfiguration")
|
||||||
|
#undef CONFIG_VARIABLE
|
||||||
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
|
#define CONFIG_VARIABLE(Type,var,name,value) \
|
||||||
|
.addFunction ("get_" # var, &SessionConfiguration::get_##var) \
|
||||||
|
.addFunction ("set_" # var, &SessionConfiguration::set_##var) \
|
||||||
|
.addProperty (#var, &SessionConfiguration::get_##var, &SessionConfiguration::set_##var)
|
||||||
|
|
||||||
|
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
|
||||||
|
.addFunction ("get_" # var, &SessionConfiguration::get_##var) \
|
||||||
|
.addFunction ("set_" # var, &SessionConfiguration::set_##var) \
|
||||||
|
.addProperty (#var, &SessionConfiguration::get_##var, &SessionConfiguration::set_##var)
|
||||||
|
|
||||||
|
#include "ardour/session_configuration_vars.h"
|
||||||
|
|
||||||
|
#undef CONFIG_VARIABLE
|
||||||
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
|
.endClass()
|
||||||
.endNamespace ();
|
.endNamespace ();
|
||||||
|
|
||||||
// basic representation of Session
|
// basic representation of Session
|
||||||
@ -1242,6 +1267,7 @@ LuaBindings::common (lua_State* L)
|
|||||||
.addFunction ("worst_input_latency", &Session::worst_input_latency)
|
.addFunction ("worst_input_latency", &Session::worst_input_latency)
|
||||||
.addFunction ("worst_track_latency", &Session::worst_track_latency)
|
.addFunction ("worst_track_latency", &Session::worst_track_latency)
|
||||||
.addFunction ("worst_playback_latency", &Session::worst_playback_latency)
|
.addFunction ("worst_playback_latency", &Session::worst_playback_latency)
|
||||||
|
.addFunction ("cfg", &Session::cfg)
|
||||||
.endClass ()
|
.endClass ()
|
||||||
|
|
||||||
.beginClass <RegionFactory> ("RegionFactory")
|
.beginClass <RegionFactory> ("RegionFactory")
|
||||||
|
Loading…
Reference in New Issue
Block a user