Browse Source

Add clang-format suppression comments

zrythm_meson
David Robillard 2 years ago
parent
commit
c2816ab42b
  1. 3
      lv2/atom/atom-test.c
  2. 4
      lv2/atom/atom.h
  3. 4
      lv2/buf-size/buf-size.h
  4. 4
      lv2/core/lv2.h
  5. 4
      lv2/data-access/data-access.h
  6. 4
      lv2/dynmanifest/dynmanifest.h
  7. 4
      lv2/event/event.h
  8. 4
      lv2/instance-access/instance-access.h
  9. 4
      lv2/log/log.h
  10. 4
      lv2/midi/midi.h
  11. 4
      lv2/morph/morph.h
  12. 4
      lv2/options/options.h
  13. 4
      lv2/parameters/parameters.h
  14. 4
      lv2/patch/patch.h
  15. 4
      lv2/port-groups/port-groups.h
  16. 4
      lv2/port-props/port-props.h
  17. 4
      lv2/presets/presets.h
  18. 4
      lv2/resize-port/resize-port.h
  19. 4
      lv2/state/state.h
  20. 4
      lv2/time/time.h
  21. 4
      lv2/ui/ui.h
  22. 4
      lv2/units/units.h
  23. 4
      lv2/uri-map/uri-map.h
  24. 4
      lv2/urid/urid.h
  25. 4
      lv2/worker/worker.h
  26. 3
      plugins/eg-fifths.lv2/fifths.c
  27. 7
      plugins/eg-metro.lv2/metro.c
  28. 3
      plugins/eg-midigate.lv2/midigate.c
  29. 13
      plugins/eg-params.lv2/params.c
  30. 3
      plugins/eg-sampler.lv2/peaks.h
  31. 15
      plugins/eg-sampler.lv2/sampler.c
  32. 3
      plugins/eg-sampler.lv2/sampler_ui.c
  33. 3
      plugins/eg-scope.lv2/examploscope.c
  34. 6
      plugins/eg-scope.lv2/examploscope_ui.c

3
lv2/atom/atom-test.c

@ -341,6 +341,8 @@ main(void) @@ -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) @@ -358,6 +360,7 @@ main(void)
eg_vector2, &matches.vector2,
eg_seq, &matches.seq,
0);
// clang-format on
}
free_urid_map();

4
lv2/atom/atom.h

@ -30,6 +30,8 @@ @@ -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 @@ @@ -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

4
lv2/buf-size/buf-size.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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
/**
@}
*/

4
lv2/core/lv2.h

@ -41,6 +41,8 @@ @@ -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 @@ @@ -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

4
lv2/data-access/data-access.h

@ -29,9 +29,13 @@ @@ -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

4
lv2/dynmanifest/dynmanifest.h

@ -33,9 +33,13 @@ @@ -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

4
lv2/event/event.h

@ -29,6 +29,8 @@ @@ -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 @@ @@ -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"

4
lv2/instance-access/instance-access.h

@ -29,8 +29,12 @@ @@ -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 */
/**

4
lv2/log/log.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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>

4
lv2/midi/midi.h

@ -35,6 +35,8 @@ @@ -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" { @@ -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.

4
lv2/morph/morph.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/options/options.h

@ -33,6 +33,8 @@ @@ -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 @@ @@ -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

4
lv2/parameters/parameters.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/patch/patch.h

@ -31,6 +31,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/port-groups/port-groups.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/port-props/port-props.h

@ -26,6 +26,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/presets/presets.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/resize-port/resize-port.h

@ -29,6 +29,8 @@ @@ -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 @@ @@ -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

4
lv2/state/state.h

@ -34,6 +34,8 @@ @@ -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 @@ @@ -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

4
lv2/time/time.h

@ -31,6 +31,8 @@ @@ -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 @@ @@ -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
/**
@}
*/

4
lv2/ui/ui.h

@ -36,6 +36,8 @@ @@ -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 @@ @@ -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.
*/

4
lv2/units/units.h

@ -28,6 +28,8 @@ @@ -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 @@ @@ -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 */
/**

4
lv2/uri-map/uri-map.h

@ -36,9 +36,13 @@ @@ -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>

4
lv2/urid/urid.h

@ -29,6 +29,8 @@ @@ -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 @@ @@ -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

4
lv2/worker/worker.h

@ -32,12 +32,16 @@ @@ -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

3
plugins/eg-fifths.lv2/fifths.c

@ -80,11 +80,14 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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);

7
plugins/eg-metro.lv2/metro.c

@ -155,11 +155,14 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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) @@ -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;

3
plugins/eg-midigate.lv2/midigate.c

@ -67,11 +67,14 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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);

13
plugins/eg-params.lv2/params.c

@ -152,12 +152,15 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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, @@ -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, @@ -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) @@ -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) @@ -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) {

3
plugins/eg-sampler.lv2/peaks.h

@ -231,11 +231,14 @@ peaks_receiver_receive(PeaksReceiver* receiver, const LV2_Atom_Object* update) @@ -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) {

15
plugins/eg-sampler.lv2/sampler.c

@ -265,12 +265,15 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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) @@ -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) @@ -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, @@ -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;

3
plugins/eg-sampler.lv2/sampler_ui.c

@ -261,12 +261,15 @@ instantiate(const LV2UI_Descriptor* descriptor, @@ -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);

3
plugins/eg-scope.lv2/examploscope.c

@ -95,11 +95,14 @@ instantiate(const LV2_Descriptor* descriptor, @@ -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);

6
plugins/eg-scope.lv2/examploscope_ui.c

@ -559,11 +559,14 @@ recv_raw_audio(EgScopeUI* ui, const LV2_Atom_Object* obj) @@ -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) @@ -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, &amp_val,
ui->uris.param_sampleRate, &rate_val,
NULL);
// clang-format on
if (n_props != 3 ||
spp_val->type != ui->uris.atom_Int ||

Loading…
Cancel
Save