12 auto isType = [](
const juce::ValueTree& node,
const String& type) {
16 return type == kwidgetType;
22 for (
auto node : kwidgetsTree)
31 if (engineRewriteResult.failed())
34 response.
message +=
"\n" + engineRewriteResult.getErrorMessage();
53 response.
message =
"RelativeSamplePathRewriteHook executed successfully";
57 std::cout <<
"RelativeSamplePathRewriteHook failed with errors: \n\t" << response.
message << std::endl;
static File getAudioAssetDirectoryForBundle(const File &bundleFile)
Returns the path to the audio assets directory for a particular bundle based on the name of the file ...
Definition PresetBundler.cpp:415
static bool isABundlePreset(const File &preset)
Returns whether this preset file is part of a bundle. This is just a simple check for that the provid...
Definition PresetBundler.cpp:425
void onPresetLoad(PresetLoadRequest &request, PresetLoadResponse &response)
Handles the preset load event, potentially rewriting relative sample paths.
Definition RelativeSamplePathRewriteHook.cpp:5
void onKwidgetLoad(KwidgetLoadRequest &request, KwidgetLoadResponse &response) override
Handles the Kwidget load event, potentially rewriting relative sample paths.
Definition RelativeSamplePathRewriteHook.cpp:3
static Result rewriteSamplePaths(ValueTree &engineKwidgetTree, File newAbsolutePath)
Rewrite relative SamplePath path values created by the PresetBundler into absolute ones of a given pa...
Definition SampleDataTree.cpp:281
Definition AirAbsorptionFilter.cpp:2
A middleware request object for a preset load event.
Definition PresetEventMiddleware.h:7
File presetFile
Definition PresetEventMiddleware.h:12
ValueTree newState
The new preset state value tree.
Definition PresetEventMiddleware.h:11
A simple middleware response object containing the success status and a message.
Definition PresetEventMiddleware.h:19
String message
A message describing the result of the middleware operation.
Definition PresetEventMiddleware.h:29
bool success
Indicates whether the middleware was successful in processing the preset load request,...
Definition PresetEventMiddleware.h:24
static const Identifier type
Definition XmlType.h:43
static const Identifier kwidgets
Definition XmlType.h:22
static const Identifier kwidget
Definition XmlType.h:23