Skip to content

Commit 16765e6

Browse files
authored
rename gain_adjustment_display to gain_adjustment_metering (#444)
* adding ext/draft/gain-reduction.h * add documentation, rename accessor function * document that the returned value represents dynamic gain reduction/expansion before make-up gain is applied * clarify what the returned value represents more precisely * rename the extension to gain-adjustment-display * rename gain-adjustment-display to gain-adjustment-metering
1 parent 406a11c commit 16765e6

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#pragma once
2+
3+
#include "../../plugin.h"
4+
5+
// This extension lets the plugin report the current gain adjustment
6+
// (typically, gain reduction) to the host.
7+
8+
static CLAP_CONSTEXPR const char CLAP_EXT_GAIN_ADJUSTMENT_METERING[] = "clap.gain-adjustment-metering/0";
9+
10+
#ifdef __cplusplus
11+
extern "C" {
12+
#endif
13+
14+
typedef struct clap_plugin_gain_adjustment_metering {
15+
// Returns the current gain adjustment in dB. The value is intended
16+
// for informational display, for example in a host meter or tooltip.
17+
// The returned value represents the gain adjustment that the plugin
18+
// applied to the last sample in the most recently processed block.
19+
//
20+
// The returned value is in dB. Zero means the plugin is applying no gain
21+
// reduction, or is not processing. A negative value means the plugin is
22+
// applying gain reduction, as with a compressor or limiter. A positive
23+
// value means the plugin is adding gain, as with an expander. The value
24+
// represents the dynamic gain reduction or expansion applied by the
25+
// plugin, before any make-up gain or other adjustment. A single value is
26+
// returned for all audio channels.
27+
//
28+
// [audio-thread]
29+
double(CLAP_ABI *get)(const clap_plugin_t *plugin);
30+
} clap_plugin_gain_adjustment_metering_t;
31+
32+
#ifdef __cplusplus
33+
}
34+
#endif

0 commit comments

Comments
 (0)