mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AudioProcessor: Fix default behaviour of updateHostDisplay
This patch fixes an issue where calling `updateHostDisplay` with no argument would have no effect.
This commit is contained in:
parent
0f6f2728f2
commit
d08b526930
2 changed files with 10 additions and 1 deletions
|
|
@ -78,6 +78,8 @@ public:
|
|||
doublePrecision
|
||||
};
|
||||
|
||||
using ChangeDetails = AudioProcessorListener::ChangeDetails;
|
||||
|
||||
//==============================================================================
|
||||
/** Destructor. */
|
||||
virtual ~AudioProcessor();
|
||||
|
|
@ -991,7 +993,7 @@ public:
|
|||
It sends a hint to the host that something like the program, number of parameters,
|
||||
etc, has changed, and that it should update itself.
|
||||
*/
|
||||
void updateHostDisplay (const AudioProcessorListener::ChangeDetails& details = {});
|
||||
void updateHostDisplay (const ChangeDetails& details = ChangeDetails::getAllChanged());
|
||||
|
||||
//==============================================================================
|
||||
/** Adds a parameter to the AudioProcessor.
|
||||
|
|
|
|||
|
|
@ -69,6 +69,13 @@ public:
|
|||
ChangeDetails withParameterInfoChanged (bool b) const noexcept { return with (&ChangeDetails::parameterInfoChanged, b); }
|
||||
ChangeDetails withProgramChanged (bool b) const noexcept { return with (&ChangeDetails::programChanged, b); }
|
||||
|
||||
static ChangeDetails getAllChanged()
|
||||
{
|
||||
return ChangeDetails{}.withLatencyChanged (true)
|
||||
.withParameterInfoChanged (true)
|
||||
.withProgramChanged (true);
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename Member, typename Value>
|
||||
ChangeDetails with (Member&& member, Value&& value) const noexcept
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue