Repository navigation
AUv2: round stepped parameters, add value strings for enum parameters - #657
Open
drbafflegab wants to merge 1 commit into
Open
drbafflegab wants to merge 1 commit into
drbafflegab wants to merge 1 commit into
Conversation
SetParameter stored and forwarded the host's raw value, so the AU could report 1.71 for a parameter the plugin holds at 2. Enum parameters now also answer kAudioUnitProperty_ParameterValueStrings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AUv2 wrapper already declares stepped parameters as Indexed. But
SetParameterpasses the host's value on as it is, so a host can set 1.71 on a parameter with steps 0, 1 and 2. The plugin uses 2, while the AU keeps reporting 1.71, and the two disagree after a state save and restore.This PR:
SetParameter, like AAX: report a positive step count, and round stepped parameter values #641 does for AAX;GetParameterValueStringsfor enum parameters, so hosts can show their names. Hosts index the array by value, so a name that can't be converted to aCFStringbecomes an empty string rather than a missing entry.Tested with
auval -strict, pluginval (strictness 10) and a small AU host that fails without the rounding.