Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
reload_abi.hpp
Go to the documentation of this file.
1#pragma once
2
35
38
39namespace pulp::format::reload {
40
43inline constexpr int kReloadAbiVersion = 1;
44
45inline constexpr const char* kAbiVersionSymbol = "pulp_reload_abi_version";
46inline constexpr const char* kFingerprintSymbol = "pulp_reload_fingerprint";
47inline constexpr const char* kCreateSymbol = "pulp_reload_create";
48inline constexpr const char* kDestroySymbol = "pulp_reload_destroy";
49
50using ReloadAbiVersionFn = int (*)();
57using ReloadDestroyFn = void (*)(Processor*);
58
59} // namespace pulp::format::reload
60
61#if defined(_WIN32)
62#define PULP_RELOAD_EXPORT extern "C" __declspec(dllexport)
63#else
64#define PULP_RELOAD_EXPORT extern "C" __attribute__((visibility("default")))
65#endif
66
73#define PULP_RELOAD_LOGIC(factory_expr) \
74 PULP_RELOAD_EXPORT int pulp_reload_abi_version() { \
75 return ::pulp::format::reload::kReloadAbiVersion; \
76 } \
77 PULP_RELOAD_EXPORT void pulp_reload_fingerprint( \
78 ::pulp::format::reload::BuildFingerprint* out) { \
79 if (out) *out = ::pulp::format::reload::current_build_fingerprint(); \
80 } \
81 PULP_RELOAD_EXPORT ::pulp::format::Processor* pulp_reload_create() { \
82 return (factory_expr); \
83 } \
84 PULP_RELOAD_EXPORT void pulp_reload_destroy(::pulp::format::Processor* p) { \
85 delete p; \
86 }
Strict build-compatibility fingerprint — the PRIMARY safety gate for DSP hot reload.
Definition processor.hpp:174
Definition build_fingerprint.hpp:23
constexpr const char * kFingerprintSymbol
Definition reload_abi.hpp:46
Processor *(*)() ReloadCreateFn
Constructs the logic Processor; the caller takes ownership of the result.
Definition reload_abi.hpp:54
void(*)(Processor *) ReloadDestroyFn
Destroys a Processor returned by ReloadCreateFn, via the logic image's operator delete (reserved; see...
Definition reload_abi.hpp:57
constexpr const char * kDestroySymbol
Definition reload_abi.hpp:48
void(*)(BuildFingerprint *out) ReloadFingerprintFn
Fills *out with the logic library's own BuildFingerprint.
Definition reload_abi.hpp:52
int(*)() ReloadAbiVersionFn
Definition reload_abi.hpp:50
constexpr const char * kAbiVersionSymbol
Definition reload_abi.hpp:45
constexpr const char * kCreateSymbol
Definition reload_abi.hpp:47
constexpr int kReloadAbiVersion
Reload entry-point ABI version.
Definition reload_abi.hpp:43
Definition build_fingerprint.hpp:28