| [Home] [Tutorials] |
|
|
| Previous | Contents | Next |
When the user initiates a procedure, the following occurs:
Data fields include a name, description, author, copyright, url, and identifier for the procedure.
Procedures must provide a suggest() and an apply() function. These functions take the same arguments (sample, parameter set, custom data). The first argument is the sample which is being edited. The second is the parameter set object to use, and the third is some custom data provided by the proc.
The suggest() function is used to set some meaningful parameter values. The apply() function does the actual work of the procedure.
A useful means of handling suggest() is to remember the parameter values set by the last invocation of this procedure. This can simply be done by keeping these values in static global variables within the plugin file.
The (sw_op_instance *) returned by the apply() function is described in section 3.1. However in the usual case of writing a selection modifier or audio filter, you do not need to understand the internals of an sw_op_instance.
You may provide some custom_data to pass to the suggest() and apply() functions if required. This is often useful if many procedures share the same suggest() and apply() functions, as custom_data can then provide further information to these functions as to how they should actually operate. See the ladspameta plugin for an example of this use of custom_data.
| Previous | Contents | Next |
|