|
|
|
@@ -61,21 +61,73 @@ public: |
|
|
|
*/
|
|
|
|
struct JUCE_API ChangeDetails
|
|
|
|
{
|
|
|
|
bool latencyChanged = false;
|
|
|
|
bool parameterInfoChanged = false;
|
|
|
|
bool programChanged = false;
|
|
|
|
/** @see withLatencyChanged */
|
|
|
|
bool latencyChanged = false;
|
|
|
|
/** @see withParameterInfoChanged */
|
|
|
|
bool parameterInfoChanged = false;
|
|
|
|
/** @see withProgramChanged */
|
|
|
|
bool programChanged = false;
|
|
|
|
/** @see withNonParameterStateChanged */
|
|
|
|
bool nonParameterStateChanged = false;
|
|
|
|
|
|
|
|
ChangeDetails withLatencyChanged (bool b) const noexcept { return with (&ChangeDetails::latencyChanged, b); }
|
|
|
|
ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); }
|
|
|
|
ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); }
|
|
|
|
/** Indicates that the AudioProcessor's latency has changed.
|
|
|
|
|
|
|
|
static ChangeDetails getAllChanged()
|
|
|
|
Most of the time, you won't need to use this function directly.
|
|
|
|
AudioProcessor::setLatencySamples() will automatically call
|
|
|
|
AudioProcessor::updateHostDisplay(), indicating that the latency has changed.
|
|
|
|
|
|
|
|
@see latencyChanged
|
|
|
|
*/
|
|
|
|
ChangeDetails withLatencyChanged (bool b) const noexcept { return with (&ChangeDetails::latencyChanged, b); }
|
|
|
|
|
|
|
|
/** Indicates that some attributes of the AudioProcessor's parameters have changed.
|
|
|
|
|
|
|
|
When this flag is set, the host should rescan the AudioProcessor's parameters, and
|
|
|
|
update its controls to match. This is often used to update the names of a plugin's
|
|
|
|
parameters in the host.
|
|
|
|
|
|
|
|
@see parameterInfoChanged
|
|
|
|
*/
|
|
|
|
ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); }
|
|
|
|
|
|
|
|
/** Indicates that the loaded program has changed.
|
|
|
|
|
|
|
|
When this flag is set, the host should call AudioProcessor::getCurrentProgram() and
|
|
|
|
update any preset list views to display the program that is currently in use.
|
|
|
|
|
|
|
|
@see programChanged
|
|
|
|
*/
|
|
|
|
ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); }
|
|
|
|
|
|
|
|
/** Indicates that the plugin state has changed (but not its parameters!).
|
|
|
|
|
|
|
|
An AudioProcessor can call updateHostDisplay with this flag set to notify the host that
|
|
|
|
its state has changed in a way that requires re-saving.
|
|
|
|
|
|
|
|
If a host receives a call to audioProcessorChanged with this flag set, it should offer
|
|
|
|
to save the plugin state before taking any actions that might irrevocably destroy the
|
|
|
|
current plugin state, such as closing the project.
|
|
|
|
|
|
|
|
@see nonParameterStateChanged
|
|
|
|
*/
|
|
|
|
ChangeDetails withNonParameterStateChanged (bool b) const noexcept { return with (&ChangeDetails::nonParameterStateChanged, b); }
|
|
|
|
|
|
|
|
/** Returns the default set of flags that will be used when
|
|
|
|
AudioProcessor::updateHostDisplay() is called with no arguments.
|
|
|
|
*/
|
|
|
|
static ChangeDetails getDefaultFlags()
|
|
|
|
{
|
|
|
|
return ChangeDetails{}.withLatencyChanged (true)
|
|
|
|
.withParameterInfoChanged (true)
|
|
|
|
.withProgramChanged (true);
|
|
|
|
}
|
|
|
|
|
|
|
|
[[deprecated ("The naming of this function is misleading. Use getDefaultFlags instead.")]]
|
|
|
|
static ChangeDetails getAllChanged()
|
|
|
|
{
|
|
|
|
return getDefaultFlags();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
template <typename Member, typename Value>
|
|
|
|
ChangeDetails with (Member&& member, Value&& value) const noexcept
|
|
|
|
|