diff options
34 files changed, 155 insertions, 0 deletions
diff --git a/lv2/atom/atom-test.c b/lv2/atom/atom-test.c index 1af1ae1..24f176e 100644 --- a/lv2/atom/atom-test.c +++ b/lv2/atom/atom-test.c @@ -341,6 +341,8 @@ main(void) return test_fail("Bad match sequence\n"); } memset(&matches, 0, sizeof(matches)); + + // clang-format off n_matches = lv2_atom_object_get((LV2_Atom_Object*)obj, eg_one, &matches.one, eg_two, &matches.two, @@ -358,6 +360,7 @@ main(void) eg_vector2, &matches.vector2, eg_seq, &matches.seq, 0); + // clang-format on } free_urid_map(); diff --git a/lv2/atom/atom.h b/lv2/atom/atom.h index 7ea0db7..2f62947 100644 --- a/lv2/atom/atom.h +++ b/lv2/atom/atom.h @@ -30,6 +30,8 @@ #include <stdint.h> +// clang-format off + #define LV2_ATOM_URI "http://lv2plug.in/ns/ext/atom" ///< http://lv2plug.in/ns/ext/atom #define LV2_ATOM_PREFIX LV2_ATOM_URI "#" ///< http://lv2plug.in/ns/ext/atom# @@ -65,6 +67,8 @@ #define LV2_ATOM__supports LV2_ATOM_PREFIX "supports" ///< http://lv2plug.in/ns/ext/atom#supports #define LV2_ATOM__timeUnit LV2_ATOM_PREFIX "timeUnit" ///< http://lv2plug.in/ns/ext/atom#timeUnit +// clang-format on + #define LV2_ATOM_REFERENCE_TYPE 0 ///< The special type for a reference atom #ifdef __cplusplus diff --git a/lv2/buf-size/buf-size.h b/lv2/buf-size/buf-size.h index 66f7de4..98f23ab 100644 --- a/lv2/buf-size/buf-size.h +++ b/lv2/buf-size/buf-size.h @@ -28,6 +28,8 @@ @{ */ +// clang-format off + #define LV2_BUF_SIZE_URI "http://lv2plug.in/ns/ext/buf-size" ///< http://lv2plug.in/ns/ext/buf-size #define LV2_BUF_SIZE_PREFIX LV2_BUF_SIZE_URI "#" ///< http://lv2plug.in/ns/ext/buf-size# @@ -40,6 +42,8 @@ #define LV2_BUF_SIZE__powerOf2BlockLength LV2_BUF_SIZE_PREFIX "powerOf2BlockLength" ///< http://lv2plug.in/ns/ext/buf-size#powerOf2BlockLength #define LV2_BUF_SIZE__sequenceSize LV2_BUF_SIZE_PREFIX "sequenceSize" ///< http://lv2plug.in/ns/ext/buf-size#sequenceSize +// clang-format on + /** @} */ diff --git a/lv2/core/lv2.h b/lv2/core/lv2.h index 7444b87..754b07a 100644 --- a/lv2/core/lv2.h +++ b/lv2/core/lv2.h @@ -41,6 +41,8 @@ #include <stdint.h> +// clang-format off + #define LV2_CORE_URI "http://lv2plug.in/ns/lv2core" ///< http://lv2plug.in/ns/lv2core #define LV2_CORE_PREFIX LV2_CORE_URI "#" ///< http://lv2plug.in/ns/lv2core# @@ -129,6 +131,8 @@ #define LV2_CORE__symbol LV2_CORE_PREFIX "symbol" ///< http://lv2plug.in/ns/lv2core#symbol #define LV2_CORE__toggled LV2_CORE_PREFIX "toggled" ///< http://lv2plug.in/ns/lv2core#toggled +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/data-access/data-access.h b/lv2/data-access/data-access.h index 3cb4624..90ba2ff 100644 --- a/lv2/data-access/data-access.h +++ b/lv2/data-access/data-access.h @@ -29,9 +29,13 @@ #ifndef LV2_DATA_ACCESS_H #define LV2_DATA_ACCESS_H +// clang-format off + #define LV2_DATA_ACCESS_URI "http://lv2plug.in/ns/ext/data-access" ///< http://lv2plug.in/ns/ext/data-access #define LV2_DATA_ACCESS_PREFIX LV2_DATA_ACCESS_URI "#" ///< http://lv2plug.in/ns/ext/data-access# +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/dynmanifest/dynmanifest.h b/lv2/dynmanifest/dynmanifest.h index 5430f37..5522039 100644 --- a/lv2/dynmanifest/dynmanifest.h +++ b/lv2/dynmanifest/dynmanifest.h @@ -33,9 +33,13 @@ #include <stdio.h> +// clang-format off + #define LV2_DYN_MANIFEST_URI "http://lv2plug.in/ns/ext/dynmanifest" ///< http://lv2plug.in/ns/ext/dynmanifest #define LV2_DYN_MANIFEST_PREFIX LV2_DYN_MANIFEST_URI "#" ///< http://lv2plug.in/ns/ext/dynmanifest# +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/event/event.h b/lv2/event/event.h index 7128c66..9a7fec4 100644 --- a/lv2/event/event.h +++ b/lv2/event/event.h @@ -29,6 +29,8 @@ #ifndef LV2_EVENT_H #define LV2_EVENT_H +// clang-format off + #define LV2_EVENT_URI "http://lv2plug.in/ns/ext/event" ///< http://lv2plug.in/ns/ext/event #define LV2_EVENT_PREFIX LV2_EVENT_URI "#" ///< http://lv2plug.in/ns/ext/event# @@ -43,6 +45,8 @@ #define LV2_EVENT__supportsEvent LV2_EVENT_PREFIX "supportsEvent" ///< http://lv2plug.in/ns/ext/event#supportsEvent #define LV2_EVENT__supportsTimeStamp LV2_EVENT_PREFIX "supportsTimeStamp" ///< http://lv2plug.in/ns/ext/event#supportsTimeStamp +// clang-format on + #define LV2_EVENT_AUDIO_STAMP 0 ///< Special timestamp type for audio frames #include "lv2/core/attributes.h" diff --git a/lv2/instance-access/instance-access.h b/lv2/instance-access/instance-access.h index 17c5a73..f32dc3d 100644 --- a/lv2/instance-access/instance-access.h +++ b/lv2/instance-access/instance-access.h @@ -29,8 +29,12 @@ #ifndef LV2_INSTANCE_ACCESS_H #define LV2_INSTANCE_ACCESS_H +// clang-format off + #define LV2_INSTANCE_ACCESS_URI "http://lv2plug.in/ns/ext/instance-access" ///< http://lv2plug.in/ns/ext/instance-access +// clang-format on + #endif /* LV2_INSTANCE_ACCESS_H */ /** diff --git a/lv2/log/log.h b/lv2/log/log.h index 0d9cfeb..de940d9 100644 --- a/lv2/log/log.h +++ b/lv2/log/log.h @@ -28,6 +28,8 @@ #ifndef LV2_LOG_H #define LV2_LOG_H +// clang-format off + #define LV2_LOG_URI "http://lv2plug.in/ns/ext/log" ///< http://lv2plug.in/ns/ext/log #define LV2_LOG_PREFIX LV2_LOG_URI "#" ///< http://lv2plug.in/ns/ext/log# @@ -38,6 +40,8 @@ #define LV2_LOG__Warning LV2_LOG_PREFIX "Warning" ///< http://lv2plug.in/ns/ext/log#Warning #define LV2_LOG__log LV2_LOG_PREFIX "log" ///< http://lv2plug.in/ns/ext/log#log +// clang-format on + #include "lv2/urid/urid.h" #include <stdarg.h> diff --git a/lv2/midi/midi.h b/lv2/midi/midi.h index f1e8b62..e41aab8 100644 --- a/lv2/midi/midi.h +++ b/lv2/midi/midi.h @@ -35,6 +35,8 @@ extern "C" { #endif +// clang-format off + #define LV2_MIDI_URI "http://lv2plug.in/ns/ext/midi" ///< http://lv2plug.in/ns/ext/midi #define LV2_MIDI_PREFIX LV2_MIDI_URI "#" ///< http://lv2plug.in/ns/ext/midi# @@ -80,6 +82,8 @@ extern "C" { #define LV2_MIDI__statusMask LV2_MIDI_PREFIX "statusMask" ///< http://lv2plug.in/ns/ext/midi#statusMask #define LV2_MIDI__velocity LV2_MIDI_PREFIX "velocity" ///< http://lv2plug.in/ns/ext/midi#velocity +// clang-format on + /** MIDI Message Type. diff --git a/lv2/morph/morph.h b/lv2/morph/morph.h index 6cef7ac..eab8c2e 100644 --- a/lv2/morph/morph.h +++ b/lv2/morph/morph.h @@ -28,6 +28,8 @@ #ifndef LV2_MORPH_H #define LV2_MORPH_H +// clang-format off + #define LV2_MORPH_URI "http://lv2plug.in/ns/ext/morph" ///< http://lv2plug.in/ns/ext/morph #define LV2_MORPH_PREFIX LV2_MORPH_URI "#" ///< http://lv2plug.in/ns/ext/morph# @@ -37,6 +39,8 @@ #define LV2_MORPH__supportsType LV2_MORPH_PREFIX "supportsType" ///< http://lv2plug.in/ns/ext/morph#supportsType #define LV2_MORPH__currentType LV2_MORPH_PREFIX "currentType" ///< http://lv2plug.in/ns/ext/morph#currentType +// clang-format on + #endif /* LV2_MORPH_H */ /** diff --git a/lv2/options/options.h b/lv2/options/options.h index c8c6a43..7b43bd1 100644 --- a/lv2/options/options.h +++ b/lv2/options/options.h @@ -33,6 +33,8 @@ #include <stdint.h> +// clang-format off + #define LV2_OPTIONS_URI "http://lv2plug.in/ns/ext/options" ///< http://lv2plug.in/ns/ext/options #define LV2_OPTIONS_PREFIX LV2_OPTIONS_URI "#" ///< http://lv2plug.in/ns/ext/options# @@ -42,6 +44,8 @@ #define LV2_OPTIONS__requiredOption LV2_OPTIONS_PREFIX "requiredOption" ///< http://lv2plug.in/ns/ext/options#requiredOption #define LV2_OPTIONS__supportedOption LV2_OPTIONS_PREFIX "supportedOption" ///< http://lv2plug.in/ns/ext/options#supportedOption +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/parameters/parameters.h b/lv2/parameters/parameters.h index aed949e..b8a40d0 100644 --- a/lv2/parameters/parameters.h +++ b/lv2/parameters/parameters.h @@ -28,6 +28,8 @@ #ifndef LV2_PARAMETERS_H #define LV2_PARAMETERS_H +// clang-format off + #define LV2_PARAMETERS_URI "http://lv2plug.in/ns/ext/parameters" ///< http://lv2plug.in/ns/ext/parameters #define LV2_PARAMETERS_PREFIX LV2_PARAMETERS_URI "#" ///< http://lv2plug.in/ns/ext/parameters# @@ -57,6 +59,8 @@ #define LV2_PARAMETERS__wetDryRatio LV2_PARAMETERS_PREFIX "wetDryRatio" ///< http://lv2plug.in/ns/ext/parameters#wetDryRatio #define LV2_PARAMETERS__wetLevel LV2_PARAMETERS_PREFIX "wetLevel" ///< http://lv2plug.in/ns/ext/parameters#wetLevel +// clang-format on + #endif /* LV2_PARAMETERS_H */ /** diff --git a/lv2/patch/patch.h b/lv2/patch/patch.h index 6793ef8..6900a7d 100644 --- a/lv2/patch/patch.h +++ b/lv2/patch/patch.h @@ -31,6 +31,8 @@ #ifndef LV2_PATCH_H #define LV2_PATCH_H +// clang-format off + #define LV2_PATCH_URI "http://lv2plug.in/ns/ext/patch" ///< http://lv2plug.in/ns/ext/patch #define LV2_PATCH_PREFIX LV2_PATCH_URI "#" ///< http://lv2plug.in/ns/ext/patch# @@ -62,6 +64,8 @@ #define LV2_PATCH__wildcard LV2_PATCH_PREFIX "wildcard" ///< http://lv2plug.in/ns/ext/patch#wildcard #define LV2_PATCH__writable LV2_PATCH_PREFIX "writable" ///< http://lv2plug.in/ns/ext/patch#writable +// clang-format on + #endif /* LV2_PATCH_H */ /** diff --git a/lv2/port-groups/port-groups.h b/lv2/port-groups/port-groups.h index 592be5e..3f4c5b9 100644 --- a/lv2/port-groups/port-groups.h +++ b/lv2/port-groups/port-groups.h @@ -28,6 +28,8 @@ #ifndef LV2_PORT_GROUPS_H #define LV2_PORT_GROUPS_H +// clang-format off + #define LV2_PORT_GROUPS_URI "http://lv2plug.in/ns/ext/port-groups" ///< http://lv2plug.in/ns/ext/port-groups #define LV2_PORT_GROUPS_PREFIX LV2_PORT_GROUPS_URI "#" ///< http://lv2plug.in/ns/ext/port-groups# @@ -66,6 +68,8 @@ #define LV2_PORT_GROUPS__source LV2_PORT_GROUPS_PREFIX "source" ///< http://lv2plug.in/ns/ext/port-groups#source #define LV2_PORT_GROUPS__subGroupOf LV2_PORT_GROUPS_PREFIX "subGroupOf" ///< http://lv2plug.in/ns/ext/port-groups#subGroupOf +// clang-format on + #endif /* LV2_PORT_GROUPS_H */ /** diff --git a/lv2/port-props/port-props.h b/lv2/port-props/port-props.h index eb55130..e5a5394 100644 --- a/lv2/port-props/port-props.h +++ b/lv2/port-props/port-props.h @@ -26,6 +26,8 @@ #ifndef LV2_PORT_PROPS_H #define LV2_PORT_PROPS_H +// clang-format off + #define LV2_PORT_PROPS_URI "http://lv2plug.in/ns/ext/port-props" ///< http://lv2plug.in/ns/ext/port-props #define LV2_PORT_PROPS_PREFIX LV2_PORT_PROPS_URI "#" ///< http://lv2plug.in/ns/ext/port-props# @@ -42,6 +44,8 @@ #define LV2_PORT_PROPS__supportsStrictBounds LV2_PORT_PROPS_PREFIX "supportsStrictBounds" ///< http://lv2plug.in/ns/ext/port-props#supportsStrictBounds #define LV2_PORT_PROPS__trigger LV2_PORT_PROPS_PREFIX "trigger" ///< http://lv2plug.in/ns/ext/port-props#trigger +// clang-format on + #endif /* LV2_PORT_PROPS_H */ /** diff --git a/lv2/presets/presets.h b/lv2/presets/presets.h index 2fc9799..40c1892 100644 --- a/lv2/presets/presets.h +++ b/lv2/presets/presets.h @@ -28,6 +28,8 @@ #ifndef LV2_PRESETS_H #define LV2_PRESETS_H +// clang-format off + #define LV2_PRESETS_URI "http://lv2plug.in/ns/ext/presets" ///< http://lv2plug.in/ns/ext/presets #define LV2_PRESETS_PREFIX LV2_PRESETS_URI "#" ///< http://lv2plug.in/ns/ext/presets# @@ -37,6 +39,8 @@ #define LV2_PRESETS__preset LV2_PRESETS_PREFIX "preset" ///< http://lv2plug.in/ns/ext/presets#preset #define LV2_PRESETS__value LV2_PRESETS_PREFIX "value" ///< http://lv2plug.in/ns/ext/presets#value +// clang-format on + #endif /* LV2_PRESETS_H */ /** diff --git a/lv2/resize-port/resize-port.h b/lv2/resize-port/resize-port.h index d3e1ebd..9c7a0d8 100644 --- a/lv2/resize-port/resize-port.h +++ b/lv2/resize-port/resize-port.h @@ -29,6 +29,8 @@ #include <stddef.h> #include <stdint.h> +// clang-format off + #define LV2_RESIZE_PORT_URI "http://lv2plug.in/ns/ext/resize-port" ///< http://lv2plug.in/ns/ext/resize-port #define LV2_RESIZE_PORT_PREFIX LV2_RESIZE_PORT_URI "#" ///< http://lv2plug.in/ns/ext/resize-port# @@ -36,6 +38,8 @@ #define LV2_RESIZE_PORT__minimumSize LV2_RESIZE_PORT_PREFIX "minimumSize" ///< http://lv2plug.in/ns/ext/resize-port#minimumSize #define LV2_RESIZE_PORT__resize LV2_RESIZE_PORT_PREFIX "resize" ///< http://lv2plug.in/ns/ext/resize-port#resize +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/state/state.h b/lv2/state/state.h index 9efb08a..9430f63 100644 --- a/lv2/state/state.h +++ b/lv2/state/state.h @@ -34,6 +34,8 @@ #include <stddef.h> #include <stdint.h> +// clang-format off + #define LV2_STATE_URI "http://lv2plug.in/ns/ext/state" ///< http://lv2plug.in/ns/ext/state #define LV2_STATE_PREFIX LV2_STATE_URI "#" ///< http://lv2plug.in/ns/ext/state# @@ -47,6 +49,8 @@ #define LV2_STATE__threadSafeRestore LV2_STATE_PREFIX "threadSafeRestore" ///< http://lv2plug.in/ns/ext/state#threadSafeRestore #define LV2_STATE__StateChanged LV2_STATE_PREFIX "StateChanged" ///< http://lv2plug.in/ns/ext/state#StateChanged +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/lv2/time/time.h b/lv2/time/time.h index 24987e1..4615056 100644 --- a/lv2/time/time.h +++ b/lv2/time/time.h @@ -31,6 +31,8 @@ #ifndef LV2_TIME_H #define LV2_TIME_H +// clang-format off + #define LV2_TIME_URI "http://lv2plug.in/ns/ext/time" ///< http://lv2plug.in/ns/ext/time #define LV2_TIME_PREFIX LV2_TIME_URI "#" ///< http://lv2plug.in/ns/ext/time# @@ -48,6 +50,8 @@ #define LV2_TIME__framesPerSecond LV2_TIME_PREFIX "framesPerSecond" ///< http://lv2plug.in/ns/ext/time#framesPerSecond #define LV2_TIME__speed LV2_TIME_PREFIX "speed" ///< http://lv2plug.in/ns/ext/time#speed +// clang-format on + /** @} */ diff --git a/lv2/ui/ui.h b/lv2/ui/ui.h index 828a8e1..ddc7f9d 100644 --- a/lv2/ui/ui.h +++ b/lv2/ui/ui.h @@ -36,6 +36,8 @@ #include <stdbool.h> #include <stdint.h> +// clang-format off + #define LV2_UI_URI "http://lv2plug.in/ns/extensions/ui" ///< http://lv2plug.in/ns/extensions/ui #define LV2_UI_PREFIX LV2_UI_URI "#" ///< http://lv2plug.in/ns/extensions/ui# @@ -74,6 +76,8 @@ #define LV2_UI__foregroundColor LV2_UI_PREFIX "foregroundColor" ///< http://lv2plug.in/ns/extensions/ui#foregroundColor #define LV2_UI__backgroundColor LV2_UI_PREFIX "backgroundColor" ///< http://lv2plug.in/ns/extensions/ui#backgroundColor +// clang-format on + /** The index returned by LV2UI_Port_Map::port_index() for unknown ports. */ diff --git a/lv2/units/units.h b/lv2/units/units.h index 333e735..b495313 100644 --- a/lv2/units/units.h +++ b/lv2/units/units.h @@ -28,6 +28,8 @@ #ifndef LV2_UNITS_H #define LV2_UNITS_H +// clang-format off + #define LV2_UNITS_URI "http://lv2plug.in/ns/extensions/units" ///< http://lv2plug.in/ns/extensions/units #define LV2_UNITS_PREFIX LV2_UNITS_URI "#" ///< http://lv2plug.in/ns/extensions/units# @@ -64,6 +66,8 @@ #define LV2_UNITS__symbol LV2_UNITS_PREFIX "symbol" ///< http://lv2plug.in/ns/extensions/units#symbol #define LV2_UNITS__unit LV2_UNITS_PREFIX "unit" ///< http://lv2plug.in/ns/extensions/units#unit +// clang-format on + #endif /* LV2_UNITS_H */ /** diff --git a/lv2/uri-map/uri-map.h b/lv2/uri-map/uri-map.h index dac7447..d6d1122 100644 --- a/lv2/uri-map/uri-map.h +++ b/lv2/uri-map/uri-map.h @@ -36,9 +36,13 @@ #ifndef LV2_URI_MAP_H #define LV2_URI_MAP_H +// clang-format off + #define LV2_URI_MAP_URI "http://lv2plug.in/ns/ext/uri-map" ///< http://lv2plug.in/ns/ext/uri-map #define LV2_URI_MAP_PREFIX LV2_URI_MAP_URI "#" ///< http://lv2plug.in/ns/ext/uri-map# +// clang-format on + #include "lv2/core/attributes.h" #include <stdint.h> diff --git a/lv2/urid/urid.h b/lv2/urid/urid.h index e96efa7..6655176 100644 --- a/lv2/urid/urid.h +++ b/lv2/urid/urid.h @@ -29,6 +29,8 @@ #ifndef LV2_URID_H #define LV2_URID_H +// clang-format off + #define LV2_URID_URI "http://lv2plug.in/ns/ext/urid" ///< http://lv2plug.in/ns/ext/urid #define LV2_URID_PREFIX LV2_URID_URI "#" ///< http://lv2plug.in/ns/ext/urid# @@ -38,6 +40,8 @@ #define LV2_URID_MAP_URI LV2_URID__map ///< Legacy #define LV2_URID_UNMAP_URI LV2_URID__unmap ///< Legacy +// clang-format on + #include <stdint.h> #ifdef __cplusplus diff --git a/lv2/worker/worker.h b/lv2/worker/worker.h index 2150702..52bc259 100644 --- a/lv2/worker/worker.h +++ b/lv2/worker/worker.h @@ -32,12 +32,16 @@ #include <stdint.h> +// clang-format off + #define LV2_WORKER_URI "http://lv2plug.in/ns/ext/worker" ///< http://lv2plug.in/ns/ext/worker #define LV2_WORKER_PREFIX LV2_WORKER_URI "#" ///< http://lv2plug.in/ns/ext/worker# #define LV2_WORKER__interface LV2_WORKER_PREFIX "interface" ///< http://lv2plug.in/ns/ext/worker#interface #define LV2_WORKER__schedule LV2_WORKER_PREFIX "schedule" ///< http://lv2plug.in/ns/ext/worker#schedule +// clang-format on + #ifdef __cplusplus extern "C" { #endif diff --git a/plugins/eg-fifths.lv2/fifths.c b/plugins/eg-fifths.lv2/fifths.c index f289026..bafd0d9 100644 --- a/plugins/eg-fifths.lv2/fifths.c +++ b/plugins/eg-fifths.lv2/fifths.c @@ -80,11 +80,14 @@ instantiate(const LV2_Descriptor* descriptor, } // Scan host features for URID map + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->logger.log, false, LV2_URID__map, &self->map, true, NULL); + // clang-format on + lv2_log_logger_set_map(&self->logger, self->map); if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); diff --git a/plugins/eg-metro.lv2/metro.c b/plugins/eg-metro.lv2/metro.c index eebad3e..6182a74 100644 --- a/plugins/eg-metro.lv2/metro.c +++ b/plugins/eg-metro.lv2/metro.c @@ -155,11 +155,14 @@ instantiate(const LV2_Descriptor* descriptor, } // Scan host features for URID map + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->logger.log, false, LV2_URID__map, &self->map, true, NULL); + // clang-format on + lv2_log_logger_set_map(&self->logger, self->map); if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); @@ -269,11 +272,15 @@ update_position(Metro* self, const LV2_Atom_Object* obj) LV2_Atom* beat = NULL; LV2_Atom* bpm = NULL; LV2_Atom* speed = NULL; + + // clang-format off lv2_atom_object_get(obj, uris->time_barBeat, &beat, uris->time_beatsPerMinute, &bpm, uris->time_speed, &speed, NULL); + // clang-format on + if (bpm && bpm->type == uris->atom_Float) { // Tempo changed, update BPM self->bpm = ((LV2_Atom_Float*)bpm)->body; diff --git a/plugins/eg-midigate.lv2/midigate.c b/plugins/eg-midigate.lv2/midigate.c index 4d1385e..5bffeea 100644 --- a/plugins/eg-midigate.lv2/midigate.c +++ b/plugins/eg-midigate.lv2/midigate.c @@ -67,11 +67,14 @@ instantiate(const LV2_Descriptor* descriptor, } // Scan host features for URID map + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->logger.log, false, LV2_URID__map, &self->map, true, NULL); + // clang-format on + lv2_log_logger_set_map(&self->logger, self->map); if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); diff --git a/plugins/eg-params.lv2/params.c b/plugins/eg-params.lv2/params.c index a302acb..eadd144 100644 --- a/plugins/eg-params.lv2/params.c +++ b/plugins/eg-params.lv2/params.c @@ -152,12 +152,15 @@ instantiate(const LV2_Descriptor* descriptor, } // Get host features + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->log.log, false, LV2_URID__map, &self->map, true, LV2_URID__unmap, &self->unmap, false, NULL); + // clang-format on + lv2_log_logger_set_map(&self->log, self->map); if (missing) { lv2_log_error(&self->log, "Missing feature <%s>\n", missing); @@ -170,6 +173,7 @@ instantiate(const LV2_Descriptor* descriptor, lv2_atom_forge_init(&self->forge, self->map); // Initialise state dictionary + // clang-format off State* state = &self->state; state_map_init( self->props, self->map, self->map->handle, @@ -183,6 +187,7 @@ instantiate(const LV2_Descriptor* descriptor, EG_PARAMS_URI "#lfo", STATE_MAP_INIT(Float, &state->lfo), EG_PARAMS_URI "#spring", STATE_MAP_INIT(Float, &state->spring), NULL); + // clang-format on return (LV2_Handle)self; } @@ -418,11 +423,15 @@ run(LV2_Handle instance, uint32_t sample_count) const LV2_Atom_URID* subject = NULL; const LV2_Atom_URID* property = NULL; const LV2_Atom* value = NULL; + + // clang-format off lv2_atom_object_get(obj, uris->patch_subject, (const LV2_Atom**)&subject, uris->patch_property, (const LV2_Atom**)&property, uris->patch_value, &value, 0); + // clang-format on + if (!subject_is_plugin(self, subject)) { lv2_log_error(&self->log, "Set for unknown subject\n"); } else if (!property) { @@ -438,10 +447,14 @@ run(LV2_Handle instance, uint32_t sample_count) // Get the property of the get message const LV2_Atom_URID* subject = NULL; const LV2_Atom_URID* property = NULL; + + // clang-format off lv2_atom_object_get(obj, uris->patch_subject, (const LV2_Atom**)&subject, uris->patch_property, (const LV2_Atom**)&property, 0); + // clang-format on + if (!subject_is_plugin(self, subject)) { lv2_log_error(&self->log, "Get with unknown subject\n"); } else if (!property) { diff --git a/plugins/eg-sampler.lv2/peaks.h b/plugins/eg-sampler.lv2/peaks.h index f3d2f04..39d56e7 100644 --- a/plugins/eg-sampler.lv2/peaks.h +++ b/plugins/eg-sampler.lv2/peaks.h @@ -231,11 +231,14 @@ peaks_receiver_receive(PeaksReceiver* receiver, const LV2_Atom_Object* update) const LV2_Atom_Int* offset = NULL; const LV2_Atom_Int* total = NULL; const LV2_Atom_Vector* peaks = NULL; + + // clang-format off lv2_atom_object_get_typed(update, uris->peaks_offset, &offset, uris->atom_Int, uris->peaks_total, &total, uris->atom_Int, uris->peaks_magnitudes, &peaks, uris->atom_Vector, 0); + // clang-format on if (!offset || !total || !peaks || peaks->body.child_type != uris->atom_Float) { diff --git a/plugins/eg-sampler.lv2/sampler.c b/plugins/eg-sampler.lv2/sampler.c index 1a13a92..cd410d1 100644 --- a/plugins/eg-sampler.lv2/sampler.c +++ b/plugins/eg-sampler.lv2/sampler.c @@ -265,12 +265,15 @@ instantiate(const LV2_Descriptor* descriptor, } // Get host features + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->logger.log, false, LV2_URID__map, &self->map, true, LV2_WORKER__schedule, &self->schedule, true, NULL); + // clang-format on + lv2_log_logger_set_map(&self->logger, self->map); if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); @@ -340,10 +343,14 @@ handle_event(Sampler* self, LV2_Atom_Event* ev) // Get the property and value of the set message const LV2_Atom* property = NULL; const LV2_Atom* value = NULL; + + // clang-format off lv2_atom_object_get(obj, uris->patch_property, &property, uris->patch_value, &value, 0); + // clang-format on + if (!property) { lv2_log_error(&self->logger, "Set message with no property\n"); return; @@ -369,10 +376,14 @@ handle_event(Sampler* self, LV2_Atom_Event* ev) } else if (obj->body.otype == uris->patch_Get && self->sample) { const LV2_Atom_URID* accept = NULL; const LV2_Atom_Int* n_peaks = NULL; + + // clang-format off lv2_atom_object_get_typed( obj, uris->patch_accept, &accept, uris->atom_URID, peaks_uris->peaks_total, &n_peaks, peaks_uris->atom_Int, 0); + // clang-format on + if (accept && accept->body == peaks_uris->peaks_PeakUpdate) { // Received a request for peaks, prepare for transmission peaks_sender_start(&self->psend, @@ -531,11 +542,15 @@ restore(LV2_Handle instance, // Get host features LV2_Worker_Schedule* schedule = NULL; LV2_State_Map_Path* paths = NULL; + + // clang-format off const char* missing = lv2_features_query( features, LV2_STATE__mapPath, &paths, true, LV2_WORKER__schedule, &schedule, false, NULL); + // clang-format on + if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); return LV2_STATE_ERR_NO_FEATURE; diff --git a/plugins/eg-sampler.lv2/sampler_ui.c b/plugins/eg-sampler.lv2/sampler_ui.c index 3070828..f733216 100644 --- a/plugins/eg-sampler.lv2/sampler_ui.c +++ b/plugins/eg-sampler.lv2/sampler_ui.c @@ -261,12 +261,15 @@ instantiate(const LV2UI_Descriptor* descriptor, ui->did_init = false; // Get host features + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &ui->logger.log , false, LV2_URID__map, &ui->map, true, LV2_UI__requestValue, &ui->request_value, false, NULL); + // clang-format on + lv2_log_logger_set_map(&ui->logger, ui->map); if (missing) { lv2_log_error(&ui->logger, "Missing feature <%s>\n", missing); diff --git a/plugins/eg-scope.lv2/examploscope.c b/plugins/eg-scope.lv2/examploscope.c index af0e302..b767508 100644 --- a/plugins/eg-scope.lv2/examploscope.c +++ b/plugins/eg-scope.lv2/examploscope.c @@ -95,11 +95,14 @@ instantiate(const LV2_Descriptor* descriptor, } // Get host features + // clang-format off const char* missing = lv2_features_query( features, LV2_LOG__log, &self->logger.log, false, LV2_URID__map, &self->map, true, NULL); + // clang-format on + lv2_log_logger_set_map(&self->logger, self->map); if (missing) { lv2_log_error(&self->logger, "Missing feature <%s>\n", missing); diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c index 32584a4..e9e0c6f 100644 --- a/plugins/eg-scope.lv2/examploscope_ui.c +++ b/plugins/eg-scope.lv2/examploscope_ui.c @@ -559,11 +559,14 @@ recv_raw_audio(EgScopeUI* ui, const LV2_Atom_Object* obj) { const LV2_Atom* chan_val = NULL; const LV2_Atom* data_val = NULL; + + // clang-format off const int n_props = lv2_atom_object_get( obj, ui->uris.channelID, &chan_val, ui->uris.audioData, &data_val, NULL); + // clang-format on if (n_props != 2 || chan_val->type != ui->uris.atom_Int || @@ -598,12 +601,15 @@ recv_ui_state(EgScopeUI* ui, const LV2_Atom_Object* obj) const LV2_Atom* spp_val = NULL; const LV2_Atom* amp_val = NULL; const LV2_Atom* rate_val = NULL; + + // clang-format off const int n_props = lv2_atom_object_get( obj, ui->uris.ui_spp, &spp_val, ui->uris.ui_amp, &_val, ui->uris.param_sampleRate, &rate_val, NULL); + // clang-format on if (n_props != 3 || spp_val->type != ui->uris.atom_Int || |