mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-14 12:30:00 +02:00
Remove cache_time_info and always cache time info
It sort of goes against yabridge's principles to not do these unnecessary `audioMasterGetTime()` calls if the plugin does that, but it also hurts the user experience to not have this as a default.
This commit is contained in:
@@ -78,13 +78,7 @@ Configuration::Configuration(const fs::path& config_path,
|
||||
// their defaults. At this point I'd really wish C++ could do pattern
|
||||
// matching.
|
||||
for (const auto& [key, value] : table) {
|
||||
if (key == "cache_time_info") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
cache_time_info = parsed_value->get();
|
||||
} else {
|
||||
invalid_options.push_back(key);
|
||||
}
|
||||
} else if (key == "editor_double_embed") {
|
||||
if (key == "editor_double_embed") {
|
||||
if (const auto parsed_value = value.as_boolean()) {
|
||||
editor_double_embed = parsed_value->get();
|
||||
} else {
|
||||
|
||||
@@ -74,20 +74,6 @@ class Configuration {
|
||||
Configuration(const boost::filesystem::path& config_path,
|
||||
const boost::filesystem::path& yabridge_path);
|
||||
|
||||
/**
|
||||
* If set to `true`, then after an `audioMasterGetTime()` call all
|
||||
* subsequent calls to that function during a single processing cycle will
|
||||
* reuse the results from the first call. In theory it would be a bug on the
|
||||
* host's side if this did _not_ return the same value every time, but since
|
||||
* yabridge tries to not have any behaviour of its own and since this
|
||||
* function should only be called at most once every processing cycle this
|
||||
* option is not enabled by default. An example of a situation where this
|
||||
* does become necessary is the SWAM Cello plugin, which calls
|
||||
* `audioMasterGetTime()` for every sample instead of only once. This would
|
||||
* tank performance without this caching behaviour.
|
||||
*/
|
||||
bool cache_time_info = false;
|
||||
|
||||
/**
|
||||
* If this is set to `true`, then the plugin editor should be embedded in
|
||||
* yet another window. This would result in an embedding sequence of
|
||||
@@ -180,7 +166,6 @@ class Configuration {
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value1b(cache_time_info);
|
||||
s.value1b(editor_double_embed);
|
||||
s.value1b(editor_force_dnd);
|
||||
s.value1b(editor_xembed);
|
||||
|
||||
Reference in New Issue
Block a user