Browse Source

discovery: Add test for quick init and cleanup in LADSPA and DSSI

tags/1.9.4
falkTX 11 years ago
parent
commit
6be14ec8ae
1 changed files with 24 additions and 2 deletions
  1. +24
    -2
      source/discovery/carla-discovery.cpp

+ 24
- 2
source/discovery/carla-discovery.cpp View File

@@ -448,7 +448,7 @@ void do_ladspa_check(void* const libHandle, const bool init)
// -----------------------------------------------------------------------
// start crash-free plugin test

const LADSPA_Handle handle = descriptor->instantiate(descriptor, kSampleRate);
LADSPA_Handle handle = descriptor->instantiate(descriptor, kSampleRate);

if (handle == nullptr)
{
@@ -456,6 +456,17 @@ void do_ladspa_check(void* const libHandle, const bool init)
continue;
}

// Test quick init and cleanup
descriptor->cleanup(handle);

handle = descriptor->instantiate(descriptor, kSampleRate);

if (handle == nullptr)
{
DISCOVERY_OUT("error", "Failed to init LADSPA plugin #2");
continue;
}

LADSPA_Data bufferAudio[kBufferSize][audioTotal];
LADSPA_Data bufferParams[parametersTotal];
LADSPA_Data min, max, def;
@@ -662,7 +673,7 @@ void do_dssi_check(void* const libHandle, const bool init)
// -----------------------------------------------------------------------
// start crash-free plugin test

const LADSPA_Handle handle = ldescriptor->instantiate(ldescriptor, kSampleRate);
LADSPA_Handle handle = ldescriptor->instantiate(ldescriptor, kSampleRate);

if (handle == nullptr)
{
@@ -670,6 +681,17 @@ void do_dssi_check(void* const libHandle, const bool init)
continue;
}

// Test quick init and cleanup
ldescriptor->cleanup(handle);

handle = ldescriptor->instantiate(ldescriptor, kSampleRate);

if (handle == nullptr)
{
DISCOVERY_OUT("error", "Failed to init DSSI plugin #2");
continue;
}

if (descriptor->get_program != nullptr && descriptor->select_program != nullptr)
{
while (descriptor->get_program(handle, programsTotal++))


Loading…
Cancel
Save