Browse Source

VST3 Host: Only send updates for modified parameters

v6.1.6
reuk 4 years ago
parent
commit
1df59f7469
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      modules/juce_audio_processors/format_types/juce_VST3Common.h

+ 3
- 3
modules/juce_audio_processors/format_types/juce_VST3Common.h View File

@@ -942,9 +942,9 @@ public:
void set (size_t index, float value)
{
jassert (index < size());
values[index].store (value, std::memory_order_relaxed);
flags[index / numFlagBits].fetch_or ((FlagType) 1 << (index % numFlagBits),
std::memory_order_acq_rel);
const auto previous = values[index].exchange (value, std::memory_order_relaxed);
const auto bit = previous == value ? ((FlagType) 0) : ((FlagType) 1 << (index % numFlagBits));
flags[index / numFlagBits].fetch_or (bit, std::memory_order_acq_rel);
}
float get (size_t index) const noexcept


Loading…
Cancel
Save