Skip to content

AUv2: presets are numbered from an unsorted, incomplete crawl #552

Description

@defiantnerd

Finding PD-5 from the 0.16 release review. The VST3 side of this was fixed in the preset-selector work; AUv2 has a narrower version of the same problem.

The problem

src/wrapasauv2.cpp:368. rebuildPresetCache() numbers and publishes an incomplete, not-yet-sorted preset list, and the crawl re-sorts when it completes. A preset number the user clicks during that window resolves via presetAt to a different preset than the one whose name they saw.

Narrower than the VST3 case (PD-4) because AU re-reads the list, so it self-corrects — but the root cause is the same: publishing an order before the order is final.

Suggested fix

Publish only a complete crawl, as the VST3 path now does after PD-2/PD-4 — _presetCacheBuilt already tracks isComplete(), so the pieces are mostly there. Alternatively, sort as entries arrive so the order never changes under the host.

Worth checking against the VST3 fix in the preset-knot PR for consistency: both formats should agree on when a list is publishable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions