[SCM] calf/master: Remove unused LV2 extensions.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:24 UTC 2013
The following commit has been merged in the master branch:
commit 825eeecf374ecf3d53273d25e84d2398d8180e9c
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Wed Sep 22 18:36:56 2010 +0100
Remove unused LV2 extensions.
diff --git a/src/calf/Makefile.am b/src/calf/Makefile.am
index cff9d9c..ae1d7af 100644
--- a/src/calf/Makefile.am
+++ b/src/calf/Makefile.am
@@ -2,9 +2,8 @@ noinst_HEADERS = audio_fx.h benchmark.h biquad.h buffer.h custom_ctl.h \
ctl_curve.h ctl_keyboard.h ctl_led.h ctl_vumeter.h \
delay.h envelope.h fft.h fixed_point.h giface.h gui.h gui_config.h gui_controls.h inertia.h jackhost.h \
host_session.h ladspa_wrap.h loudness.h \
- lv2_contexts.h lv2_data_access.h lv2_event.h lv2_external_ui.h \
- lv2_persist.h lv2_progress.h lv2_polymorphic_port.h lv2_string_port.h lv2_ui.h \
- lv2_uri_map.h lv2-midiport.h lv2helpers.h lv2wrap.h \
+ lv2_data_access.h lv2_event.h lv2_external_ui.h \
+ lv2_persist.h lv2_progress.h lv2_ui.h lv2_uri_map.h lv2helpers.h lv2wrap.h \
main_win.h metadata.h modmatrix.h \
modules.h modules_comp.h modules_dev.h modules_dist.h modules_eq.h modules_mod.h modules_synths.h \
modulelist.h \
diff --git a/src/calf/lv2-midiport.h b/src/calf/lv2-midiport.h
deleted file mode 100644
index 30309b6..0000000
--- a/src/calf/lv2-midiport.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************************
-
- lv2-midiport.h - header file for using MIDI in LV2 plugins
-
- Copyright (C) 2006 Lars Luthman <lars.luthman at gmail.com>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
-
-****************************************************************************/
-
-/** @file
- This file contains the specification for an LV2 MIDI port extension.
-*/
-
-#ifndef LV2_MIDIPORT_H
-#define LV2_MIDIPORT_H
-
-
-/** This data structure is used to contain the MIDI events for one run()
- cycle. The port buffer for an LV2 port of the type
- <http://ll-plugins.nongnu.org/lv2/ext/MidiPort> should be a pointer
- to an instance of this struct.
-
- To store two Note On events on MIDI channel 0 in a buffer, with timestamps
- 12 and 35.5, you could use something like this code (assuming that
- midi_data is a variable of type LV2_MIDI):
- @code
-
- uint32_t buffer_offset = 0;
- *(double*)(midi_data->data + buffer_offset) = 12;
- buffer_offset += sizeof(double);
- *(uint32_t*)(midi_data->data + buffer_offset) = 3;
- buffer_offset += sizeof(uint32_t);
- midi_data->data[buffer_offset++] = 0x90;
- midi_data->data[buffer_offset++] = 0x48;
- midi_data->data[buffer_offset++] = 0x64;
- ++midi_data->event_count;
-
- *(double*)(midi_data->data + buffer_offset) = 35.5;
- buffer_offset += sizeof(double);
- *(uint32_t*)(midi_data->data + buffer_offset) = 3;
- buffer_offset += sizeof(uint32_t);
- midi_data->data[buffer_offset++] = 0x90;
- midi_data->data[buffer_offset++] = 0x55;
- midi_data->data[buffer_offset++] = 0x64;
- ++midi_data->event_count;
-
- midi_data->size = buffer_offset;
-
- @endcode
-
- This would be done by the host in the case of an input port, and by the
- plugin in the case of an output port. Whoever is writing events to the
- buffer must also take care not to exceed the capacity of the data buffer.
-
- To read events from a buffer, you could do something like this:
- @code
-
- uint32_t buffer_offset = 0;
- uint32_t i;
- for (i = 0; i < midi_data->event_count; ++i) {
- double timestamp = *(double*)(midi_data->data + buffer_offset);
- buffer_offset += sizeof(double);
- uint32_t size = *(uint32_t*)(midi_data->data + buffer_offset);
- buffer_offset += sizeof(uint32_t);
- do_something_with_event(timestamp, size,
- midi_data->data + buffer_offset);
- buffer_offset += size;
- }
-
- @endcode
-
- If you think this looks like too much code to simply read and write MIDI
- events, take a look at the helper functions in lv2-midifunctions.h. They
- are not an official part of this extension, but they can be convenient.
-*/
-typedef struct {
-
- /** The number of MIDI events in the data buffer.
- INPUT PORTS: It's the host's responsibility to set this field to the
- number of MIDI events contained in the data buffer before calling the
- plugin's run() function. The plugin may not change this field.
- OUTPUT PORTS: It's the plugin's responsibility to set this field to the
- number of MIDI events it has stored in the data buffer before returning
- from the run() function. Any initial value should be ignored by the
- plugin.
- */
- uint32_t event_count;
-
- /** The size of the data buffer in bytes. It is set by the host and may not
- be changed by the plugin. The host is allowed to change this between
- run() calls.
- */
- uint32_t capacity;
-
- /** The size of the initial part of the data buffer that actually contains
- data.
- INPUT PORTS: It's the host's responsibility to set this field to the
- number of bytes used by all MIDI events it has written to the buffer
- (including timestamps and size fields) before calling the plugin's
- run() function. The plugin may not change this field.
- OUTPUT PORTS: It's the plugin's responsibility to set this field to
- the number of bytes used by all MIDI events it has written to the
- buffer (including timestamps and size fields) before returning from
- the run() function. Any initial value should be ignored by the plugin.
- */
- uint32_t size;
-
- /** The data buffer that is used to store MIDI events. The events are packed
- after each other, and the format of each event is as follows:
-
- First there is a timestamp, which should have the type "double",
- i.e. have the same bit size as a double and the same bit layout as a
- double (whatever that is on the current platform). This timestamp gives
- the offset from the beginning of the current cycle, in frames, that
- the MIDI event occurs on. It must be strictly smaller than the 'nframes'
- parameter to the current run() call. The MIDI events in the buffer must
- be ordered by their timestamp, e.g. an event with a timestamp of 123.23
- must be stored after an event with a timestamp of 65.0.
-
- The second part of the event is a size field, which should have the type
- "uint32_t" (as defined in the standard C header stddef.h). It should
- contain the size of the MIDI data for this event, i.e. the number of
- bytes used to store the actual MIDI event. The bytes used by the
- timestamp and the size field should not be counted.
-
- The third part of the event is the actual MIDI data. There are some
- requirements that must be followed:
-
- * Running status is not allowed. Every event must have its own status
- byte.
- * Note On events with velocity 0 are not allowed. These events are
- equivalent to Note Off in standard MIDI streams, but in order to make
- plugins and hosts easier to write, as well as more efficient, only
- proper Note Off events are allowed as Note Off.
- * "Realtime events" (status bytes 0xF8 to 0xFF) are allowed, but may not
- occur inside other events like they are allowed to in hardware MIDI
- streams.
- * All events must be fully contained in a single data buffer, i.e. events
- may not "wrap around" by storing the first few bytes in one buffer and
- then wait for the next run() call to store the rest of the event. If
- there isn't enough space in the current data buffer to store an event,
- the event will either have to wait until next run() call, be ignored,
- or compensated for in some more clever way.
- * All events must be valid MIDI events. This means for example that
- only the first byte in each event (the status byte) may have the eighth
- bit set, that Note On and Note Off events are always 3 bytes long etc.
- The MIDI writer (host or plugin) is responsible for writing valid MIDI
- events to the buffer, and the MIDI reader (plugin or host) can assume
- that all events are valid.
-
- On a platform where double is 8 bytes the data buffer layout for a
- 3-byte event followed by a 4-byte event may look something like this:
- _______________________________________________________________
- | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...
- |TIMESTAMP 1 |SIZE 1 |DATA |TIMESTAMP 2 |SIZE 2 |DATA | ...
-
- */
- unsigned char* data;
-
-} LV2_MIDI;
-
-
-
-#endif
diff --git a/src/calf/lv2_contexts.h b/src/calf/lv2_contexts.h
deleted file mode 100644
index 59ac603..0000000
--- a/src/calf/lv2_contexts.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* LV2 OSC Messages Extension
- * Copyright (C) 2007-2008 Dave Robillard <dave at drobilla.net>
- *
- * This header is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This header is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef LV2_CONTEXTS_H
-#define LV2_CONTEXTS_H
-
-#include <stdint.h>
-
-#define LV2_CONTEXTS_URI "http://lv2plug.in/ns/dev/contexts"
-
-#define LV2_CONTEXT_MESSAGE "http://lv2plug.in/ns/dev/contexts#MessageContext"
-
-static inline void
-lv2_contexts_set_port_valid(void* flags, uint32_t index) {
- ((uint8_t*)flags)[index / 8] |= 1 << (index % 8);
-}
-
-static inline void
-lv2_contexts_unset_port_valid(void* flags, uint32_t index) {
- ((uint8_t*)flags)[index / 8] &= ~(1 << (index % 8));
-}
-
-static inline int
-lv2_contexts_port_is_valid(const void* flags, uint32_t index) {
- return (((uint8_t*)flags)[index / 8] & (1 << (index % 8))) != 0;
-}
-
-#include "lv2.h"
-#include <stdbool.h>
-
-
-typedef struct {
- /** The message run function. This is called once to process a set of
- * inputs and produce a set of outputs. Before calling the host MUST
- * set valid_inputs such that the bit corresponding to each input port
- * is 1 iff data is present. The plugin MUST only inspect bits
- * corresponding to ports in the message thread. Before returning the
- * plugin MUST set valid_outputs such that the bit corresponding to
- * each output port of the message context is 1 iff data has been written
- * to that port in the duration of this function invocation.
- * The plugin must return 1 if outputs have been written, 0 otherwise.
- */
- uint32_t (*message_run)(LV2_Handle instance,
- const void* valid_inputs,
- void* valid_outputs);
-
- /** The message thread function alalogous to the LV2 connect_port
- * function. This function must only be used to connect ports that
- * belong to the message context. */
- void (*message_connect_port)(LV2_Handle instance,
- uint32_t port,
- void* data);
-
-} LV2MessageContext;
-
-
-#endif // LV2_CONTEXTS_H
-
diff --git a/src/calf/lv2_polymorphic_port.h b/src/calf/lv2_polymorphic_port.h
deleted file mode 100644
index 231c219..0000000
--- a/src/calf/lv2_polymorphic_port.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* lv2_data_access.h - C header file for the LV2 Data Access extension.
- * Copyright (C) 2008 Dave Robillard <dave at drobilla.net>
- *
- * This header is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This header is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this header; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
- */
-
-#ifndef LV2_POLYMORPHIC_PORT_H
-#define LV2_POLYMORPHIC_PORT_H
-
-#define LV2_POLYMORPHIC_PORT_URI "http://lv2plug.in/ns/dev/polymorphic-port"
-
-
-/** @file
- * This header defines the LV2 Polymorphic Port extension with the URI
- * <http://lv2plug.in/ns/dev/polymorphic-port>.
- *
- * This extension defines a buffer format for ports that can take on
- * various types dynamically at runtime.
- */
-
-
-/** The data field of the LV2_Feature for this extension.
- *
- * To support this feature the host must pass an LV2_Feature struct to the
- * instantiate method with URI "http://lv2plug.in/ns/dev/polymorphic-port"
- * and data pointed to an instance of this struct.
- */
-typedef struct {
-
- /** Set the type of a polymorphic port.
- * If the plugin specifies constraints on port types, the host MUST NOT
- * call the run method until all port types have been set to a valid
- * configuration. Whenever the type for a port is changed, the host
- * MUST call connect_port before the next call to the run method.
- * The return value of this function SHOULD be ignored by hosts at this
- * time (future revisions of this extension may specify return values).
- * Plugins which do not know of any future revision or extension that
- * dictates otherwise MUST return 0 from this function.
- * @param port Index of the port to connect (same as LV2 connect_port)
- * @param type Mapped URI for the type of data being connected
- * @param type_data Type specific data defined by type URI (may be NULL)
- * @return Unused at this time
- */
- uint32_t (*set_type)(LV2_Handle instance,
- uint32_t port,
- uint32_t type,
- void* type_data);
-
-} LV2_Polymorphic_Feature;
-
-
-#endif // LV2_POLYMORPHIC_PORT_H
-
diff --git a/src/calf/lv2_string_port.h b/src/calf/lv2_string_port.h
deleted file mode 100644
index 57b6c18..0000000
--- a/src/calf/lv2_string_port.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* lv2_string_port.h - C header file for LV2 string port extension.
- * Draft version 3.
- *
- * Copyright (C) 2008 Krzysztof Foltman <wdev at foltman.com>
- *
- * This header is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This header is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this header; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 01222-1307 USA
- */
-
-#ifndef LV2_STRING_PORT_H
-#define LV2_STRING_PORT_H
-
-#include <stdint.h>
-
-/** \file
-Input ports string value lifetime:
-If the port does not have a context specified (it runs in the default,
-realtime audio processing context), the values in the structure and
-the actual string data MUST remain unchanged for the time a run() function
-of a plugin is executed. However, if the port belongs to a different
-context, the same data MUST remain unchanged only for the time a run() or
-message_process() function of a given context is executed.
-
-Output ports string value lifetime:
-The plugin may only change the string or length in a run() function (if
-the port belongs to default context) or in context-defined counterparts
-(if the port belongs to another context). Because of that, using default
-context output string ports is contraindicated for longer strings.
-
-UI issues:
-When using port_event / write_port (and possible other communication
-mechanisms), the format parameter should contain the numeric value
-of URI LV2_STRING_PORT_URI (mapped with http://lv2plug.in/ns/extensions/ui
-specified as map URI).
-
-It's probably possible to use ports belonging to message context
-<http://lv2plug.in/ns/dev/contexts#MessageContext> for transfer. However,
-contexts mechanism does not offer any way to notify the message recipient
-about which ports have been changed. To remedy that, this extension defines
-a flag LV2_STRING_DATA_CHANGED_FLAG that carries that information inside
-a port value structure.
-
-Storage:
-The value of string port are assumed to be "persistent": if a host
-saves and restores a state of a plugin (e.g. control port values), the
-values of input string ports should also be assumed to belong to that
-state. This also applies to message context: if a session is being restored,
-the host MUST resend the last value that was sent to the port before session
-has been saved. In other words, string port values "stick" to message ports.
-*/
-
-/** URI for the string port transfer mechanism feature */
-#define LV2_STRING_PORT_URI "http://lv2plug.in/ns/dev/string-port#StringTransfer"
-
-/** Flag: port data has been updated; for input ports, this flag is set by
-the host. For output ports, this flag is set by the plugin. */
-#define LV2_STRING_DATA_CHANGED_FLAG 1
-
-/** structure for string port data */
-struct _LV2_String_Data
-{
- /** buffer for UTF-8 encoded zero-terminated string value; host-allocated */
- char *data;
- /** length in bytes (not characters), not including zero byte */
- size_t len;
- /** output ports: storage space in bytes; must be >= RDF-specified requirements */
- size_t storage;
- /** flags defined above */
- uint32_t flags;
- /** undefined yet, used for padding to 8 bytes */
- uint32_t pad;
-};
-
-typedef struct _LV2_String_Data LV2_String_Data;
-
-#endif
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list