mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
LuaProc: allow plugin to prefer a regular block length
This equivalent to http://lv2plug.in/ns/ext/buf-size#coarseBlockLength
This commit is contained in:
parent
45b2791341
commit
be3d3a6d00
2 changed files with 6 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ public:
|
||||||
void cleanup () { }
|
void cleanup () { }
|
||||||
|
|
||||||
int set_block_size (pframes_t /*nframes*/) { return 0; }
|
int set_block_size (pframes_t /*nframes*/) { return 0; }
|
||||||
|
bool requires_fixed_sized_buffers () const { return _requires_fixed_sized_buffers; }
|
||||||
bool connect_all_audio_outputs () const { return _connect_all_audio_outputs; }
|
bool connect_all_audio_outputs () const { return _connect_all_audio_outputs; }
|
||||||
|
|
||||||
int connect_and_run (BufferSet& bufs,
|
int connect_and_run (BufferSet& bufs,
|
||||||
|
|
@ -163,6 +164,7 @@ private:
|
||||||
std::string _docs;
|
std::string _docs;
|
||||||
bool _lua_does_channelmapping;
|
bool _lua_does_channelmapping;
|
||||||
bool _lua_has_inline_display;
|
bool _lua_has_inline_display;
|
||||||
|
bool _requires_fixed_sized_buffers;
|
||||||
bool _connect_all_audio_outputs;
|
bool _connect_all_audio_outputs;
|
||||||
bool _set_time_info;
|
bool _set_time_info;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@ LuaProc::LuaProc (AudioEngine& engine,
|
||||||
, _script (script)
|
, _script (script)
|
||||||
, _lua_does_channelmapping (false)
|
, _lua_does_channelmapping (false)
|
||||||
, _lua_has_inline_display (false)
|
, _lua_has_inline_display (false)
|
||||||
|
, _requires_fixed_sized_buffers (false)
|
||||||
, _connect_all_audio_outputs (false)
|
, _connect_all_audio_outputs (false)
|
||||||
, _set_time_info (false)
|
, _set_time_info (false)
|
||||||
, _designated_bypass_port (UINT32_MAX)
|
, _designated_bypass_port (UINT32_MAX)
|
||||||
|
|
@ -300,6 +301,9 @@ LuaProc::load_script ()
|
||||||
if (i.key().cast<std::string> () == "time_info" && i.value().isBoolean ()) {
|
if (i.key().cast<std::string> () == "time_info" && i.value().isBoolean ()) {
|
||||||
_set_time_info = i.value().cast<bool> ();
|
_set_time_info = i.value().cast<bool> ();
|
||||||
}
|
}
|
||||||
|
if (i.key().cast<std::string> () == "regular_block_length" && i.value().isBoolean ()) {
|
||||||
|
_requires_fixed_sized_buffers = i.value().cast<bool> ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue