christophhart / HISE

The open source framework for sample based instruments
http://hise.audio
Other
1.07k stars 123 forks source link

[bug] getUserPresetDirectory() doesn't work with full expansions #381

Open davidhealey opened 1 year ago

davidhealey commented 1 year ago

Forum Discussion

https://forum.hise.audio/topic/7228/get-current-expansion-within-frontendhandler-getuserpresetdirectory

Commit

fcad7d6f02284a19f894921fe8767222c7f02239

Tested

OS: Linux HISE: n/a Compiled Project: Yes

In compiled Full Expansion projects FrontendHandler::getUserPresetDirectory() will always return the project's user presets folder rather than the preset folder for the current expansion. The main problem with this is that the loadNextUserPreset and loadPreviousUserPreset script functions don't work.

I've tried to fix this myself with code along these lines:

const auto& ExpansionHandler* expHandler;

Expansion* currentExpansion = expHandler.getCurrentExpansion();

But this causes a sissegv and I don't know how to solve it.

davidhealey commented 1 year ago

I've found a fix for the previous/next preset loading, it doesn't solve it at the root though at the getUserPresetDirectory() function so there might be more to do.

https://github.com/christophhart/HISE/pull/384