1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#pragma once
#include "../plugin.h"
static CLAP_CONSTEXPR const char CLAP_EXT_RENDER[] = "clap.render";
#ifdef __cplusplus
extern "C" {
#endif
enum {
// Default setting, for "realtime" processing
CLAP_RENDER_REALTIME = 0,
// For processing without realtime pressure
// The plugin may use more expensive algorithms for higher sound quality.
CLAP_RENDER_OFFLINE = 1,
};
typedef int32_t clap_plugin_render_mode;
// The render extension is used to let the plugin know if it has "realtime"
// pressure to process.
//
// If this information does not influence your rendering code, then don't
// implement this extension.
typedef struct clap_plugin_render {
// Returns true if the plugin has an hard requirement to process in real-time.
// This is especially useful for plugin acting as a proxy to an hardware device.
// [main-thread]
bool(CLAP_ABI *has_hard_realtime_requirement)(const clap_plugin_t *plugin);
// Returns true if the rendering mode could be applied.
// [main-thread]
bool(CLAP_ABI *set)(const clap_plugin_t *plugin, clap_plugin_render_mode mode);
} clap_plugin_render_t;
#ifdef __cplusplus
}
#endif
|