HISE Logo Forum
    • Categories
    • Register
    • Login

    Get current expansion within FrontendHandler::getUserPresetDirectory

    Scheduled Pinned Locked Moved C++ Development
    2 Posts 1 Posters 181 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healeyD
      d.healey
      last edited by d.healey

      With full expansions the getUserPresetDirectory() function returns the plugin preset directory instead of the expansion's.

      So within that function I want to get the current expansion, check if it's a full expansion, and if so return its user preset directory instead.

      So I add this, around line 1540:

      ExpansionHandler* expHandler;
      
      Expansion* currentExpansion = expHandler->getCurrentExpansion();
      

      But now I get a crash on startup on the getCurrentExpansion() line. The stack trace points me to inline ObjectType* get() const noexcept { return owner; } in juce_WeakReference.h but I'm not sure what the problem is. @Christoph-Hart any hints?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      1 Reply Last reply Reply Quote 1
      • d.healeyD
        d.healey
        last edited by

        I've opened a github issue about this

        Link Preview Image
        [bug] getUserPresetDirectory() doesn't work with full expansions · Issue #381 · christophhart/HISE

        Forum Discussion https://forum.hise.audio/topic/7228/get-current-expansion-within-frontendhandler-getuserpresetdirectory Commit fcad7d6 Tested OS: Linux HISE: n/a Compiled Project: Yes In compiled Full Expansion projects FrontendHandler:...

        favicon

        GitHub (github.com)

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        47

        Online

        1.7k

        Users

        11.7k

        Topics

        101.9k

        Posts