diff options
author | David Robillard <d@drobilla.net> | 2012-08-29 18:12:02 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-29 18:12:02 +0000 |
commit | 85b9c0298c07db382b3fde7a947ebd44322e52e6 (patch) | |
tree | 3744de24e99700cc7889ae850d269f7f3db42170 | |
parent | 4e3771992fb6b5e198060563c0481d658271717d (diff) | |
download | lv2-85b9c0298c07db382b3fde7a947ebd44322e52e6.tar.xz |
Remove old buf-size API.
-rw-r--r-- | lv2/lv2plug.in/ns/ext/buf-size/buf-size.h | 78 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl | 40 |
2 files changed, 14 insertions, 104 deletions
diff --git a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h index 36884f3..20cd8fd 100644 --- a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h +++ b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h @@ -17,14 +17,9 @@ #ifndef LV2_BUF_SIZE_H #define LV2_BUF_SIZE_H -#include <stdint.h> - -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" - #define LV2_BUF_SIZE_URI "http://lv2plug.in/ns/ext/buf-size" #define LV2_BUF_SIZE_PREFIX LV2_BUF_SIZE_URI "#" -#define LV2_BUF_SIZE__access LV2_BUF_SIZE_PREFIX "access" #define LV2_BUF_SIZE__boundedBlockLength LV2_BUF_SIZE_PREFIX "boundedBlockLength" #define LV2_BUF_SIZE__fixedBlockLength LV2_BUF_SIZE_PREFIX "fixedBlockLength" #define LV2_BUF_SIZE__maxBlockLength LV2_BUF_SIZE_PREFIX "maxBlockLength" @@ -32,77 +27,4 @@ #define LV2_BUF_SIZE__powerOf2BlockLength LV2_BUF_SIZE_PREFIX "powerOf2BlockLength" #define LV2_BUF_SIZE__sequenceSize LV2_BUF_SIZE_PREFIX "sequenceSize" -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - LV2_BUF_SIZE_SUCCESS = 0, /**< Completed successfully. */ - LV2_BUF_SIZE_ERR_UNKNOWN = 1, /**< Unknown error. */ - LV2_BUF_SIZE_ERR_BAD_TYPE = 2 /**< Failed due to unsupported type. */ -} LV2_Buf_Size_Status; - -typedef void* LV2_Buf_Size_Access_Handle; - -/** - The data for feature LV2_BUF_SIZE__access. -*/ -typedef struct { - /** - Opaque host data. - */ - LV2_Buf_Size_Access_Handle handle; - - /** - The size of this struct. - - The host MUST set this to sizeof(LV2_Buf_Size_Feature). - */ - uint32_t size; - - /** - Get properties of the sample_count parameter of LV2_Descriptor::run(). - - @param handle The handle field of this struct. - @param min Set to the minimum block length. - @param max Set to the maximum block length, or 0 for unlimited. - @param multiple_of Set to a number the block length will always be a - multiple of, possibly 1 for arbitrary block lengths. - @param power_of Set to a number the block length will always be a power - of, or 0 if no such restriction applies. - @return 0 for success, otherwise an error code. - */ - LV2_Buf_Size_Status - (*get_sample_count)(LV2_Buf_Size_Access_Handle handle, - uint32_t* min, - uint32_t* max, - uint32_t* multiple_of, - uint32_t* power_of); - - /** - Get the size for buffers of a given type. - - This function is useful for plugins that need to allocate auxiliary - buffers for data types other than audio. A typical use case is to first - get the maximum block length with get_sample_count(), then determine the - space required for a Sequence by calling this function with type @ref - LV2_ATOM__Sequence. - - @param handle The handle field of this struct. - @param buf_size Set to the requested buffer size, or 0 if unknown. - @param type The type of buffer. - @param sample_count The duration of time the buffer must represent. - @return The space required for the buffer, or 0 if unknown. - */ - LV2_Buf_Size_Status - (*get_buf_size)(LV2_Buf_Size_Access_Handle handle, - uint32_t* buf_size, - LV2_URID type, - uint32_t sample_count); -} LV2_Buf_Size_Access; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - #endif /* LV2_BUF_SIZE_H */ diff --git a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl index 1c9b508..9313b11 100644 --- a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl +++ b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl @@ -16,8 +16,9 @@ block length (the sample_count parameter of LV2_Descriptor::run) and port buffer sizes, as well as several features which can be used to restrict the block length.</p> -<p>The host provides access to all the relevant information via the -bufsz:access feature.</p> +<p>This extension only defines data-only features and properties and has no C +API of its own. The host provides all the relevant information to the plugin as <a +href="http://lv2plug.in/ns/ext/options#options">options</a></p> <p>To require restrictions on the block length, plugins can require additional features: bufsz:boundedBlockLength, bufsz:powerOf2BlockLength, and @@ -25,36 +26,25 @@ bufsz:fixedBlockLength. These features are data-only, that is they merely indicate a restriction and do not carry any data or API.</p> """ . -bufsz:access - a lv2:Feature ; - lv2:documentation """ -<p>The feature that provides access to buffer size information. This feature -is the only one in this extension which carries data: to implement it the host -passes a feature with URI LV2_BUF_SIZE__access and an LV2_Buf_Size_Access -for data, which provides functions the plugin can call to investigate the -buffer size.</p> -""" . - bufsz:boundedBlockLength a lv2:Feature ; lv2:documentation """ -<p>A feature that indicates the host will provide a minimum and maximum block -length via LV2_Buf_Size_Access::get_sample_count(). Plugins that copy data -from audio inputs can require this feature to ensure they know how much space -is required for auxilliary buffers. Note the minimum may be zero, this feature -is mainly useful to ensure a maximum is available.</p> +<p>A feature that indicates the host will provide both the bufsz:minBlockLength +and bufsz:maxBlockLength options to the plugin. Plugins that copy data from +audio inputs can require this feature to ensure they know how much space is +required for auxiliary buffers. Note the minimum may be zero, this feature is +mainly useful to ensure a maximum is available.</p> <p>All hosts SHOULD support this feature, since it is simple to support and -necessary for plugins to create auxiliary buffers.</p> +necessary for any plugins that may need to copy the input.</p> """ . bufsz:fixedBlockLength a lv2:Feature ; lv2:documentation """ <p>A feature that indicates the host will always call LV2_Descriptor::run() -with the same value for sample_count. If available, -LV2_Buf_Size_Access::get_sample_count() must report this value for both min -and max.</p> +with the same value for sample_count. This length MUST be provided as the +value of both the bufsz:minBlockLength and bufsz:maxBlockLength options.</p> <p>Note that requiring this feature may severely limit the number of hosts capable of running the plugin.</p> @@ -64,11 +54,9 @@ bufsz:powerOf2BlockLength a lv2:Feature ; lv2:documentation """ <p>A feature that indicates the host will always call LV2_Descriptor::run() -with a power of two sample_count. If available, -LV2_Buf_Size_Access::get_sample_count() must report this value for both min -and max. Note this feature does not guarantee the value is the same each call, -to ensure that the plugin must require both this feature and -bufsz:fixedBlockLength.</p> +with a power of two sample_count. Note that this feature does not guarantee +the value is the same each call, to guarantee a fixed power of two block length +plugins must require both this feature and bufsz:fixedBlockLength.</p> <p>Note that requiring this feature may severely limit the number of hosts capable of running the plugin.</p> |