LMMS
Loading...
Searching...
No Matches
process.h
Go to the documentation of this file.
1#pragma once
2
3#include "events.h"
4#include "audio-buffer.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10enum {
11 // Processing failed. The output buffer must be discarded.
13
14 // Processing succeeded, keep processing.
16
17 // Processing succeeded, keep processing if the output is not quiet.
19
20 // Rely upon the plugin's tail to determine if the plugin should continue to process.
21 // see clap_plugin_tail
23
24 // Processing succeeded, but no more processing is required,
25 // until the next event or variation in audio input.
27};
29
30typedef struct clap_process {
31 // A steady sample time counter.
32 // This field can be used to calculate the sleep duration between two process calls.
33 // This value may be specific to this plugin instance and have no relation to what
34 // other plugin instances may receive.
35 //
36 // Set to -1 if not available, otherwise the value must be greater or equal to 0,
37 // and must be increased by at least `frames_count` for the next call to process.
38 int64_t steady_time;
39
40 // Number of frames to process
42
43 // time info at sample 0
44 // If null, then this is a free running host, no transport events will be provided
46
47 // Audio buffers, they must have the same count as specified
48 // by clap_plugin_audio_ports->get_count().
49 // The index maps to clap_plugin_audio_ports->get_info().
54
55 // Input and output events.
56 //
57 // Events must be sorted by time.
58 // The input event list can't be modified.
62
63#ifdef __cplusplus
64}
65#endif
struct clap_audio_buffer clap_audio_buffer_t
struct clap_input_events clap_input_events_t
struct clap_output_events clap_output_events_t
struct clap_event_transport clap_event_transport_t
int int32_t
Definition mid.cpp:97
unsigned int uint32_t
Definition mid.cpp:100
int32_t clap_process_status
Definition process.h:28
@ CLAP_PROCESS_TAIL
Definition process.h:22
@ CLAP_PROCESS_CONTINUE_IF_NOT_QUIET
Definition process.h:18
@ CLAP_PROCESS_SLEEP
Definition process.h:26
@ CLAP_PROCESS_ERROR
Definition process.h:12
@ CLAP_PROCESS_CONTINUE
Definition process.h:15
struct clap_process clap_process_t
Definition process.h:30
clap_audio_buffer_t * audio_outputs
Definition process.h:51
const clap_output_events_t * out_events
Definition process.h:60
const clap_audio_buffer_t * audio_inputs
Definition process.h:50
const clap_event_transport_t * transport
Definition process.h:45
uint32_t audio_inputs_count
Definition process.h:52
int64_t steady_time
Definition process.h:38
uint32_t audio_outputs_count
Definition process.h:53
uint32_t frames_count
Definition process.h:41
const clap_input_events_t * in_events
Definition process.h:59