Fix rt-safety of LuaProc w/o chanmapping
Since Lua function arguments are not typed, there is no explicit "const", and a function can always modify the parameter. When passing `ChanMapping const&` as argument, the object is copy constructed. In this specific case the std::map<> members of ChanMapping allocate memory. Passing a pointer to the object works around this issue. LuaBridge later dereferences the object as needed when calling c++ methods, and copy-construction would only happen later.
This commit is contained in:
parent
01a75c04b1
commit
6f5d6e9ba2
@ -651,7 +651,7 @@ LuaProc::connect_and_run (BufferSet& bufs,
|
||||
try {
|
||||
if (_lua_does_channelmapping) {
|
||||
// run the DSP function
|
||||
(*_lua_dsp)(&bufs, in, out, nframes, offset);
|
||||
(*_lua_dsp)(&bufs, &in, &out, nframes, offset);
|
||||
} else {
|
||||
// map buffers
|
||||
BufferSet& silent_bufs = _session.get_silent_buffers (ChanCount (DataType::AUDIO, 1));
|
||||
|
Loading…
Reference in New Issue
Block a user