Skip to content

Commit

Permalink
Rename clap_plugin_id_t to clap_universal_plugin_id_t
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Jan 17, 2024
1 parent 43d80c5 commit fd83c02
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ We may decide to remove the `*_COMPAT` IDs in the future once their usage become
* `CLAP_EXT_CV` the interface wasn't satisfying.

## Stabilize factory

* `CLAP_PRESET_DISCOVERY_FACTORY_ID`

Note: we kept the last draft factory ID in order to not break plugins already using it.
Expand All @@ -44,6 +45,10 @@ Note: we kept the last draft factory ID in order to not break plugins already us

* Introduction of a new factory which provides a plugin state convertion mechanism.

## Refactoring

* `clap_plugin_id_t` was renamed to `clap_universal_plugin_id_t` to make it clear that it can describe more than just a CLAP plugin ID.

## Documentation

* [events.h](include/clap/events.h): Clarify how "Port Channel Key NoteID" matching works
Expand Down
2 changes: 1 addition & 1 deletion include/clap/clap.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "plugin.h"
#include "plugin-features.h"
#include "host.h"
#include "plugin-id.h"
#include "universal-plugin-id.h"

#include "ext/ambisonic.h"
#include "ext/audio-ports-activation.h"
Expand Down
6 changes: 3 additions & 3 deletions include/clap/factory/draft/plugin-state-converter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "../../id.h"
#include "../../plugin-id.h"
#include "../../universal-plugin-id.h"
#include "../../stream.h"
#include "../../version.h"

Expand All @@ -12,8 +12,8 @@ extern "C" {
typedef struct clap_plugin_state_converter_descriptor {
clap_version_t clap_version;

clap_plugin_id_t src_plugin_id;
clap_plugin_id_t dst_plugin_id;
clap_universal_plugin_id_t src_plugin_id;
clap_universal_plugin_id_t dst_plugin_id;

const char *name;
const char *vendor;
Expand Down
4 changes: 2 additions & 2 deletions include/clap/factory/preset-discovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "../private/std.h"
#include "../private/macros.h"
#include "../version.h"
#include "../plugin-id.h"
#include "../universal-plugin-id.h"

// Use it to retrieve const clap_preset_discovery_factory_t* from
// clap_plugin_entry.get_factory()
Expand Down Expand Up @@ -133,7 +133,7 @@ typedef struct clap_preset_discovery_metadata_receiver {

// Adds a plug-in id that this preset can be used with.
void(CLAP_ABI *add_plugin_id)(const struct clap_preset_discovery_metadata_receiver *receiver,
const clap_plugin_id_t *plugin_id);
const clap_universal_plugin_id_t *plugin_id);

// Sets the sound pack to which the preset belongs to.
void(CLAP_ABI *set_soundpack_id)(const struct clap_preset_discovery_metadata_receiver *receiver,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#pragma once

// Pair of plugin ABI and plugin identifier.
typedef struct clap_plugin_id {
//
// If you want to represent other formats please send us an update to the comment with the
// name of the abi and the representation of the id.
typedef struct clap_universal_plugin_id {
// The plugin ABI name, in lowercase.
// eg: "clap", "vst3", "vst2", "au", "lv2", ...
// eg: "clap", "vst3", "vst2", "au", ...
const char *abi;

// The plugin ID, formatted as follow:
Expand All @@ -20,4 +23,4 @@ typedef struct clap_plugin_id {
// VST3: print the id as a standard UUID
// eg: "123e4567-e89b-12d3-a456-426614174000"
const char *id;
} clap_plugin_id_t;
} clap_universal_plugin_id_t;

0 comments on commit fd83c02

Please sign in to comment.