mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-06 19:50:11 +02:00
Add back path free calls on linux only
This commit is contained in:
Vendored
+3
-3
@@ -96,9 +96,9 @@ inline void disable_denormals() noexcept {
|
|||||||
#endif
|
#endif
|
||||||
#elif defined(ARCH_ARM)
|
#elif defined(ARCH_ARM)
|
||||||
#if defined __has_builtin
|
#if defined __has_builtin
|
||||||
#if __has_builtin(__builtin_arm_set_fpscr) && __has_builtin(__builtin_arm_get_fpscr)
|
#if __has_builtin(__builtin_arm_set_fpscr) && __has_builtin(__builtin_arm_get_fpscr)
|
||||||
__builtin_arm_set_fpscr(__builtin_arm_get_fpscr() | (1 << 24));
|
__builtin_arm_set_fpscr(__builtin_arm_get_fpscr() | (1 << 24));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -200,7 +200,7 @@ namespace NAM {
|
|||||||
uint32_t flags, const LV2_Feature* const* features)
|
uint32_t flags, const LV2_Feature* const* features)
|
||||||
{
|
{
|
||||||
auto nam = static_cast<NAM::Plugin*>(instance);
|
auto nam = static_cast<NAM::Plugin*>(instance);
|
||||||
|
|
||||||
lv2_log_trace(&nam->logger, "Saving state\n");
|
lv2_log_trace(&nam->logger, "Saving state\n");
|
||||||
|
|
||||||
if (!nam->currentModel) {
|
if (!nam->currentModel) {
|
||||||
@@ -211,10 +211,13 @@ namespace NAM {
|
|||||||
|
|
||||||
// Map absolute sample path to an abstract state path
|
// Map absolute sample path to an abstract state path
|
||||||
char* apath = map_path->abstract_path(map_path->handle, nam->currentModelPath.c_str());
|
char* apath = map_path->abstract_path(map_path->handle, nam->currentModelPath.c_str());
|
||||||
|
|
||||||
store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path,
|
store(handle, nam->uris.model_Path, apath, strlen(apath) + 1, nam->uris.atom_Path,
|
||||||
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
|
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
|
||||||
|
|
||||||
|
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
|
||||||
|
free(apath);
|
||||||
|
#endif
|
||||||
return LV2_STATE_SUCCESS;
|
return LV2_STATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -251,6 +254,10 @@ namespace NAM {
|
|||||||
memcpy(msg.path, path, size);
|
memcpy(msg.path, path, size);
|
||||||
nam->schedule->schedule_work(nam->schedule->handle, sizeof(msg), &msg);
|
nam->schedule->schedule_work(nam->schedule->handle, sizeof(msg), &msg);
|
||||||
|
|
||||||
|
#ifndef _WIN32 // https://github.com/drobilla/lilv/issues/14
|
||||||
|
free(path);
|
||||||
|
#endif
|
||||||
|
|
||||||
return LV2_STATE_SUCCESS;
|
return LV2_STATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user