Skip to content

AAX parameters not initialized correctly #1111

@pressplay-music

Description

@pressplay-music

If you Set a parameter value in your plug-in constructor, this value will be ignored in AAX versions of the plug-in. This does not happen with VST or audio units.

Reproduction:

MyPlugin::MyPlugin(...)
{
    ...
    GetParam(0)->InitDouble(...);
    GetParam(0)->Set(ValueOtherThanDefault);
}

ValueOtherThanDefault will be ignored. This scenario may sound a bit exotic. In my case, I am setting a user-defined initial value that is loaded from a json file stored on disk. This value is not the parameter default value (if you double-click on the corresponding control you will reset to the default value, not the user-defined init value).

I believe I know the reason for this behaviour and how to fix it. But I wanted to discuss this first before submitting a pull request.

So in IPlugAAX.cpp there is a function EffectInit() where AAX_CParameters are created. I think we need to also call pAAXParam->SetValueWithDouble(pParam->Value()); there.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions