Browse Source

continue

tags/1.9.6
falkTX 9 years ago
parent
commit
1ebe3e8d35
4 changed files with 73 additions and 32 deletions
  1. +13
    -5
      source/includes/lv2/morph.h
  2. +14
    -1
      source/includes/lv2/options.h
  3. +17
    -5
      source/includes/lv2/resize-port.h
  4. +29
    -21
      source/includes/lv2/state.h

+ 13
- 5
source/includes/lv2/morph.h View File

@@ -14,13 +14,17 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

#ifndef LV2_MORPH_H
#define LV2_MORPH_H
/**
@defgroup morph Morph

#include <stdint.h>
Ports that can dynamically change type, see <http://lv2plug.in/ns/ext/morph>
for details.

@{
*/

#include "lv2.h"
#include "urid.h"
#ifndef LV2_MORPH_H
#define LV2_MORPH_H

#define LV2_MORPH_URI "http://lv2plug.in/ns/ext/morph"
#define LV2_MORPH_PREFIX LV2_MORPH_URI "#"
@@ -32,3 +36,7 @@
#define LV2_MORPH__currentType LV2_MORPH_PREFIX "currentType"

#endif /* LV2_MORPH_H */

/**
@}
*/

+ 14
- 1
source/includes/lv2/options.h View File

@@ -14,13 +14,22 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

/**
@defgroup options Options

Instantiation time options, see <http://lv2plug.in/ns/ext/options> for
details.

@{
*/

#ifndef LV2_OPTIONS_H
#define LV2_OPTIONS_H

#include <stdint.h>

#include "urid.h"
#include "lv2.h"
#include "urid.h"

#define LV2_OPTIONS_URI "http://lv2plug.in/ns/ext/options"
#define LV2_OPTIONS_PREFIX LV2_OPTIONS_URI "#"
@@ -130,3 +139,7 @@ typedef struct _LV2_Options_Interface {
#endif

#endif /* LV2_OPTIONS_H */

/**
@}
*/

+ 17
- 5
source/includes/lv2/resize-port.h View File

@@ -14,6 +14,14 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

/**
@defgroup resize-port Resize Port

Dynamically sized LV2 port buffers.

@{
*/

#ifndef LV2_RESIZE_PORT_H
#define LV2_RESIZE_PORT_H

@@ -42,20 +50,21 @@ typedef enum {

typedef void* LV2_Resize_Port_Feature_Data;

/** Host feature to allow plugins to resize their port buffers. */
typedef struct {
LV2_Resize_Port_Feature_Data data;

/**
Resize a port buffer to at least @a size bytes.
Resize a port buffer to at least `size` bytes.
This function MAY return an error, in which case the port buffer was not
resized and the port is still connected to the same location. Plugins
MUST gracefully handle this situation.
This function is in the audio threading class.
The host MUST preserve the contents of the port buffer when resizing.
Plugins MAY resize a port many times in a single run callback. Hosts
SHOULD make this as inexpensive as possible.
*/
@@ -70,3 +79,6 @@ typedef struct {

#endif /* LV2_RESIZE_PORT_H */

/**
@}
*/

+ 29
- 21
source/includes/lv2/state.h View File

@@ -16,8 +16,12 @@
*/

/**
@file state.h
C API for the LV2 State extension <http://lv2plug.in/ns/ext/state>.
@defgroup state State

An interface for LV2 plugins to save and restore state, see
<http://lv2plug.in/ns/ext/state> for details.

@{
*/

#ifndef LV2_STATE_H
@@ -105,11 +109,11 @@ typedef enum {
/**
A host-provided function to store a property.
@param handle Must be the handle passed to LV2_State_Interface.save().
@param key The key to store @p value under (URID).
@param key The key to store `value` under (URID).
@param value Pointer to the value to be stored.
@param size The size of @p value in bytes.
@param type The type of @p value (URID).
@param flags LV2_State_Flags for @p value.
@param size The size of `value` in bytes.
@param type The type of `value` (URID).
@param flags LV2_State_Flags for `value`.
@return 0 on success, otherwise a non-zero error code.

The host passes a callback of this type to LV2_State_Interface.save(). This
@@ -129,8 +133,8 @@ typedef enum {
(http://lv2plug.in/ns/ext/atom) wherever possible. The plugin SHOULD
attempt to fall-back and avoid the error if possible.

Note that @p size MUST be > 0, and @p value MUST point to a valid region of
memory @p size bytes long (this is required to make restore unambiguous).
Note that `size` MUST be > 0, and `value` MUST point to a valid region of
memory `size` bytes long (this is required to make restore unambiguous).

The plugin MUST NOT attempt to use this function outside of the
LV2_State_Interface.restore() context.
@@ -151,7 +155,7 @@ typedef LV2_State_Status (*LV2_State_Store_Function)(
@param type (Output) If non-NULL, set to the type of the restored value.
@param flags (Output) If non-NULL, set to the flags for the restored value.
@return A pointer to the restored value (object), or NULL if no value
has been stored under @p key.
has been stored under `key`.

A callback of this type is passed by the host to
LV2_State_Interface.restore(). This callback is called repeatedly by the
@@ -188,12 +192,12 @@ typedef const void* (*LV2_State_Retrieve_Function)(
*/
typedef struct _LV2_State_Interface {
/**
Save plugin state using a host-provided @p store callback.
Save plugin state using a host-provided `store` callback.

@param instance The instance handle of the plugin.
@param store The host-provided store callback.
@param handle An opaque pointer to host data which MUST be passed as the
handle parameter to @p store if it is called.
handle parameter to `store` if it is called.
@param flags Flags describing desired properties of this save. These
flags may be used to determine the most appropriate values to store.
@param features Extensible parameter for passing any additional
@@ -204,7 +208,7 @@ typedef struct _LV2_State_Interface {
possible, and consider the possibility of state being restored much
later on a different machine.

The @p handle pointer and @p store function MUST NOT be used
The `handle` pointer and `store` function MUST NOT be used
beyond the scope of save().

This function has its own special threading class: it may not be called
@@ -230,12 +234,12 @@ typedef struct _LV2_State_Interface {
const LV2_Feature *const * features);

/**
Restore plugin state using a host-provided @p retrieve callback.
Restore plugin state using a host-provided `retrieve` callback.

@param instance The instance handle of the plugin.
@param retrieve The host-provided retrieve callback.
@param handle An opaque pointer to host data which MUST be passed as the
handle parameter to @p retrieve if it is called.
handle parameter to `retrieve` if it is called.
@param flags Currently unused.
@param features Extensible parameter for passing any additional
features to be used for this restore.
@@ -247,7 +251,7 @@ typedef struct _LV2_State_Interface {
not be retrieved. This allows the host to reset the plugin state with
an empty map.

The @p handle pointer and @p store function MUST NOT be used
The `handle` pointer and `store` function MUST NOT be used
beyond the scope of restore().

This function is in the "Instantiation" threading class as defined by
@@ -262,7 +266,7 @@ typedef struct _LV2_State_Interface {
} LV2_State_Interface;

/**
Feature data for state:mapPath (LV2_STATE__mapPath).
Feature data for state:mapPath (@ref LV2_STATE__mapPath).
*/
typedef struct {
/**
@@ -272,18 +276,18 @@ typedef struct {

/**
Map an absolute path to an abstract path for use in plugin state.
@param handle MUST be the @p handle member of this struct.
@param handle MUST be the `handle` member of this struct.
@param absolute_path The absolute path of a file.
@return An abstract path suitable for use in plugin state.

The plugin MUST use this function to map any paths that will be stored
in plugin state. The returned value is an abstract path which MAY not
be an actual file system path; @ref absolute_path() MUST be used to map
be an actual file system path; absolute_path() MUST be used to map
it to an actual path in order to use the file.

Plugins MUST NOT make any assumptions about abstract paths except that
they can be mapped back to the absolute path of the "same" file (though
not necessarily the same original path) using @ref absolute_path().
not necessarily the same original path) using absolute_path().

This function may only be called within the context of
LV2_State_Interface methods. The caller is responsible for freeing the
@@ -294,7 +298,7 @@ typedef struct {

/**
Map an abstract path from plugin state to an absolute path.
@param handle MUST be the @p handle member of this struct.
@param handle MUST be the `handle` member of this struct.
@param abstract_path An abstract path (e.g. a path from plugin state).
@return An absolute file system path.

@@ -320,7 +324,7 @@ typedef struct {

/**
Return a path the plugin may use to create a new file.
@param handle MUST be the @p handle member of this struct.
@param handle MUST be the `handle` member of this struct.
@param path The path of the new file within a namespace unique to this
plugin instance.
@return The absolute path to use for the new file.
@@ -350,3 +354,7 @@ typedef struct {
#endif

#endif /* LV2_STATE_H */

/**
@}
*/

Loading…
Cancel
Save