Skip to content

Commit

Permalink
adding ext/draft/gain-adjustment-metering.h (#422, #440, #444)
Browse files Browse the repository at this point in the history
  • Loading branch information
schwaaa authored and abique committed Jan 20, 2025
1 parent 63579c8 commit 982c606
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/clap/all.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "factory/draft/plugin-state-converter.h"

#include "ext/draft/extensible-audio-ports.h"
#include "ext/draft/gain-adjustment-display.h"
#include "ext/draft/resource-directory.h"
#include "ext/draft/transport-control.h"
#include "ext/draft/triggers.h"
Expand Down
34 changes: 34 additions & 0 deletions include/clap/ext/draft/gain-adjustment-metering.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include "../../plugin.h"

// This extension lets the plugin report the current gain adjustment
// (typically, gain reduction) to the host.

static CLAP_CONSTEXPR const char CLAP_EXT_GAIN_ADJUSTMENT_METERING[] = "clap.gain-adjustment-metering/0";

#ifdef __cplusplus
extern "C" {
#endif

typedef struct clap_plugin_gain_adjustment_metering {
// Returns the current gain adjustment in dB. The value is intended
// for informational display, for example in a host meter or tooltip.
// The returned value represents the gain adjustment that the plugin
// applied to the last sample in the most recently processed block.
//
// The returned value is in dB. Zero means the plugin is applying no gain
// reduction, or is not processing. A negative value means the plugin is
// applying gain reduction, as with a compressor or limiter. A positive
// value means the plugin is adding gain, as with an expander. The value
// represents the dynamic gain reduction or expansion applied by the
// plugin, before any make-up gain or other adjustment. A single value is
// returned for all audio channels.
//
// [audio-thread]
double(CLAP_ABI *get)(const clap_plugin_t *plugin);
} clap_plugin_gain_adjustment_metering_t;

#ifdef __cplusplus
}
#endif

0 comments on commit 982c606

Please sign in to comment.