Closed BillyDM closed 1 year ago
The host doesn't know anything about what the plugin is going to output, so it cannot determine whether that output is going to have a constant value (be it silence or something else) in advance. So the host can set the constant masks on the input buffers, and the plugin can set the constant masks on the output buffers. Note that constant masks are an optional feature, and you'll likely find that most plugins and hosts won't do anything with them.
I see. Thanks for clearing things up!
I would like some clarification on who gets to actually write to the
constant_mask
field in theclap_audio_buffer
struct. I think this should also be clarified in the docs.So it's my understanding that the host sets the
constant_mask
field for both input and output buffers accordingly before calling the plugin'sprocess()
method. Then in theprocess()
method, the plugin may change theconstant_mask
field in any output buffer to let the host (and future plugins in the process chain) know if the constant-ness of the output has changed as a result of the processing. Also, a plugin is not allowed to change theconstant_mask
field for any input buffers.Is this correct?