13
0

some new lua-bindings and session-lua (creating sessions)

This commit is contained in:
Robin Gareus 2016-04-24 14:39:58 +02:00
parent f02db9b04e
commit f80c0faa24
2 changed files with 12 additions and 1 deletions

View File

@ -980,6 +980,8 @@ LuaBindings::common (lua_State* L)
.addFunction ("controllable_by_id", &Session::controllable_by_id)
.addFunction ("processor_by_id", &Session::processor_by_id)
.addFunction ("snap_name", &Session::snap_name)
.addFunction ("monitor_out", &Session::monitor_out)
.addFunction ("master_out", &Session::master_out)
.addFunction ("tempo_map", (TempoMap& (Session::*)())&Session::tempo_map)
.addFunction ("locations", &Session::locations)
.addFunction ("begin_reversible_command", (void (Session::*)(const std::string&))&Session::begin_reversible_command)

View File

@ -188,7 +188,15 @@ static Session * _create_session (string dir, string state, uint32_t rate)
return 0;
}
Session* session = new Session (*engine, dir, state);
// TODO add option/bindings for this
BusProfile bus_profile;
bus_profile.master_out_channels = 2;
bus_profile.input_ac = AutoConnectPhysical;
bus_profile.output_ac = AutoConnectMaster;
bus_profile.requested_physical_in = 0; // use all available
bus_profile.requested_physical_out = 0; // use all available
Session* session = new Session (*engine, dir, state, &bus_profile);
return session;
}
@ -385,6 +393,7 @@ int main (int argc, char **argv)
break;
}
if (strlen (line) == 0) {
free (line);
continue;
}
if (!lua->do_command (line)) {