Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build example project: SignalGenerator #100

Open
godofecht opened this issue Sep 21, 2023 · 1 comment
Open

Unable to build example project: SignalGenerator #100

godofecht opened this issue Sep 21, 2023 · 1 comment

Comments

@godofecht
Copy link

I get the following error: Use of class template 'juce::Component::SafePointer' requires template arguments

System: Mac OS M1
JUCE: 7.0.2

@godofecht
Copy link
Author

Changing the line in juce::Component::SafePointerjuce::AudioProcessorEditor safeEditor (editor); worked for me.

in foleys_MagicProcessorState...

`void MagicProcessorState::setStateInformation (const void* data, int sizeInBytes, juce::AudioProcessorEditor* editor)
{
auto tree = juce::ValueTree::readFromData (data, size_t (sizeInBytes));
if (tree.isValid() == false)
return;

auto newState = getValueTree();
if (newState.getType() != tree.getType())
    return;

newState.copyPropertiesAndChildrenFrom (tree, nullptr);

parameters.loadParameterValues (newState);

if (editor)
{
    int width, height;

    if (getLastEditorSize (width, height))
    {
        juce::Component::SafePointer<juce::AudioProcessorEditor> safeEditor (editor);
        juce::MessageManager::callAsync([safeEditor, width, height]
                                        {
            if (safeEditor)
                safeEditor->setSize (width, height);
                                        });
    }
}

}`

May I submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant