2 LV2 ControlInputPort change request extension
3 Copyright 2020 Filipe Coelho <falktx@falktx.com>
5 Permission to use, copy, modify, and/or distribute this software for any
6 purpose with or without fee is hereby granted, provided that the above
7 copyright notice and this permission notice appear in all copies.
9 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 @file control-input-port-change-request.h
20 C header for the LV2 ControlInputPort change request extension <http://kx.studio/ns/lv2ext/control-input-port-change-request>.
23 #ifndef LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H
24 #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H
28 #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "http://kx.studio/ns/lv2ext/control-input-port-change-request"
29 #define LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_PREFIX LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI "#"
39 /** A status code for LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI functions. */
41 LV2_CONTROL_INPUT_PORT_CHANGE_SUCCESS
= 0, /**< Completed successfully. */
42 LV2_CONTROL_INPUT_PORT_CHANGE_ERR_UNKNOWN
= 1, /**< Unknown error. */
43 LV2_CONTROL_INPUT_PORT_CHANGE_ERR_INVALID_INDEX
= 2 /**< Failed due to invalid port index. */
44 } LV2_ControlInputPort_Change_Status
;
47 * Opaque handle for LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature.
49 typedef void* LV2_ControlInputPort_Change_Request_Handle
;
52 * On instantiation, host must supply LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI feature.
53 * LV2_Feature::data must be pointer to LV2_ControlInputPort_Change_Request.
55 typedef struct _LV2_ControlInputPort_Change_Request
{
59 LV2_ControlInputPort_Change_Request_Handle handle
;
64 * Ask the host to change a plugin's control input port value.
65 * Parameter handle MUST be the 'handle' member of this struct.
66 * Parameter index is port index to change.
67 * Parameter value is the requested value to change the control port input to.
69 * Returns status of the request.
70 * The host may decline this request, if e.g. it is currently automating this port.
72 * The plugin MUST call this function during run().
74 LV2_ControlInputPort_Change_Status (*request_change
)(LV2_ControlInputPort_Change_Request_Handle handle
,
78 } LV2_ControlInputPort_Change_Request
;
84 #endif /* LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_H */