rename to avoid clashes, clean up mutex which was only really needed for OSC GUI, fix attribution

This commit is contained in:
Gordon JC Pearce 2023-06-19 21:07:17 +01:00
parent 3959cf7eb2
commit 7f43f8987b
6 changed files with 16 additions and 45 deletions

View File

@ -7,3 +7,6 @@ plus a nicer UI with a simple cat animation. 🐈
## Screenshot
![Nekobi](https://raw.githubusercontent.com/DISTRHO/nekobi/master/plugins/Nekobi/Screenshot.png "Nekobi")<br/>
## Building
Don't forget to do `git submodule update --init --recursive` to pull in dependencies

View File

@ -1,5 +1,6 @@
/*
* DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
* DISTRHO Nekobi Plugin, based on Nekobee by Gordon JC Pearce
* using code originally by Sean Bolton and others.
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
@ -21,9 +22,9 @@
#include "DistrhoArtworkNekobi.hpp"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Nekobi"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Nekobi"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.Nekobi"
#define DISTRHO_PLUGIN_NAME "Nekobi-v8"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Nekobi-v8"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.Nekobi-v8"
#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1

View File

@ -24,33 +24,6 @@
#include "nekobee-src/nekobee_voice_render.c"
#include "nekobee-src/minblep_tables.c"
// -----------------------------------------------------------------------
// mutual exclusion
bool dssp_voicelist_mutex_trylock(nekobee_synth_t* const synth)
{
/* Attempt the mutex lock */
if (!synth->voicelist_mutex.try_lock())
{
synth->voicelist_mutex_grab_failed = 1;
return false;
}
/* Clean up if a previous mutex grab failed */
if (synth->voicelist_mutex_grab_failed)
{
nekobee_synth_all_voices_off(synth);
synth->voicelist_mutex_grab_failed = 0;
}
return true;
}
void dssp_voicelist_mutex_unlock(nekobee_synth_t* const synth)
{
synth->voicelist_mutex.unlock();
}
// -----------------------------------------------------------------------
// nekobee_handle_raw_event
@ -106,7 +79,6 @@ DistrhoPluginNekobi::DistrhoPluginNekobi()
fSynth.held_keys[i] = -1;
fSynth.voice = nekobee_voice_new();
fSynth.voicelist_mutex_grab_failed = 0;
fSynth.channel_pressure = 0;
fSynth.pitch_wheel_sensitivity = 0;
@ -358,7 +330,7 @@ void DistrhoPluginNekobi::run(const float**, float** outputs, uint32_t frames, c
float* out = outputs[0];
if (fSynth.voice == nullptr || ! dssp_voicelist_mutex_trylock(&fSynth))
if (fSynth.voice == nullptr)
{
std::memset(out, 0, sizeof(float)*frames);
return;
@ -404,8 +376,6 @@ void DistrhoPluginNekobi::run(const float**, float** outputs, uint32_t frames, c
framesDone += burstSize;
fSynth.nugget_remains -= burstSize;
}
dssp_voicelist_mutex_unlock(&fSynth);
}
// -----------------------------------------------------------------------

View File

@ -1,6 +1,8 @@
/*
* DISTRHO Nekobi Plugin, based on Nekobee by Sean Bolton and others.
* DISTRHO Nekobi Plugin, based on Nekobee by Gordonjcp
* using code originally by Sean Bolton and others.
* Copyright (C) 2004 Sean Bolton and others
* Copyright (C) 2005 Gordonjcp
* Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
@ -52,7 +54,7 @@ protected:
const char* getLabel() const noexcept override
{
return "Nekobi";
return "Nekobi-v8";
}
const char* getDescription() const override
@ -62,12 +64,12 @@ protected:
const char* getMaker() const noexcept override
{
return "Sean Bolton, falkTX";
return "Gordon JC Pearce, falkTX";
}
const char* getHomePage() const override
{
return "https://github.com/DISTRHO/Nekobi";
return "https://gjcp.net/plugins/Nekobi-v8";
}
const char* getLicense() const noexcept override
@ -82,7 +84,7 @@ protected:
int64_t getUniqueId() const noexcept override
{
return d_cconst('D', 'N', 'e', 'k');
return d_cconst('D', 'N', 'e', '8');
}
// -------------------------------------------------------------------

View File

@ -29,7 +29,6 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <mutex>
#include "nekobee.h"
#include "nekobee_synth.h"

View File

@ -26,8 +26,6 @@
#ifndef _XSYNTH_SYNTH_H
#define _XSYNTH_SYNTH_H
#include <mutex>
#include "nekobee.h"
#include "nekobee_types.h"
@ -64,8 +62,6 @@ struct _nekobee_synth_t {
//nekobee_voice_t *voice[XSYNTH_MAX_POLYPHONY];
nekobee_voice_t *voice;
std::mutex voicelist_mutex;
int voicelist_mutex_grab_failed;
/* current non-paramter-mapped controller values */
unsigned char key_pressure[128];