mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-10 04:30:14 +02:00
Formatting
This commit is contained in:
+2
-1
@@ -27,7 +27,7 @@ static LV2_Handle instantiate(const LV2_Descriptor*, double rate, const char*, c
|
|||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
catch(const std::exception& e)
|
catch(const std::exception)
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -36,6 +36,7 @@ static LV2_Handle instantiate(const LV2_Descriptor*, double rate, const char*, c
|
|||||||
static void connect_port(LV2_Handle instance, uint32_t port, void* data)
|
static void connect_port(LV2_Handle instance, uint32_t port, void* data)
|
||||||
{
|
{
|
||||||
auto nam = static_cast<NAM::Plugin*>(instance);
|
auto nam = static_cast<NAM::Plugin*>(instance);
|
||||||
|
|
||||||
*(reinterpret_cast<void**>(&nam->ports)+port) = data;
|
*(reinterpret_cast<void**>(&nam->ports)+port) = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -25,7 +25,8 @@ namespace NAM {
|
|||||||
// for fetching initial options, can be null
|
// for fetching initial options, can be null
|
||||||
LV2_Options_Option* options = nullptr;
|
LV2_Options_Option* options = nullptr;
|
||||||
|
|
||||||
for (size_t i = 0; features[i]; ++i) {
|
for (size_t i = 0; features[i]; ++i)
|
||||||
|
{
|
||||||
if (std::string(features[i]->URI) == std::string(LV2_URID__map))
|
if (std::string(features[i]->URI) == std::string(LV2_URID__map))
|
||||||
map = static_cast<LV2_URID_Map*>(features[i]->data);
|
map = static_cast<LV2_URID_Map*>(features[i]->data);
|
||||||
else if (std::string(features[i]->URI) == std::string(LV2_WORKER__schedule))
|
else if (std::string(features[i]->URI) == std::string(LV2_WORKER__schedule))
|
||||||
@@ -144,6 +145,7 @@ namespace NAM {
|
|||||||
{
|
{
|
||||||
auto msg = static_cast<const LV2FreeModelMsg*>(data);
|
auto msg = static_cast<const LV2FreeModelMsg*>(data);
|
||||||
delete msg->model;
|
delete msg->model;
|
||||||
|
|
||||||
return LV2_WORKER_SUCCESS;
|
return LV2_WORKER_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,7 +302,8 @@ namespace NAM {
|
|||||||
|
|
||||||
lv2_log_trace(&nam->logger, "Saving state\n");
|
lv2_log_trace(&nam->logger, "Saving state\n");
|
||||||
|
|
||||||
if (!nam->currentModel) {
|
if (!nam->currentModel)
|
||||||
|
{
|
||||||
return LV2_STATE_SUCCESS;
|
return LV2_STATE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ namespace NAM {
|
|||||||
LV2_Atom_Forge atom_forge = {};
|
LV2_Atom_Forge atom_forge = {};
|
||||||
LV2_Atom_Forge_Frame sequence_frame;
|
LV2_Atom_Forge_Frame sequence_frame;
|
||||||
|
|
||||||
float m_rate;
|
|
||||||
float inputLevel = 0;
|
float inputLevel = 0;
|
||||||
float outputLevel = 0;
|
float outputLevel = 0;
|
||||||
int32_t maxBufferSize = 0;
|
int32_t maxBufferSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user