aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy2
-rw-r--r--include/lv2/atom/atom.h4
-rw-r--r--include/lv2/atom/util.h2
-rw-r--r--include/lv2/core/lv2.h1
-rw-r--r--lv2/core.lv2/lv2core.meta.ttl2
-rw-r--r--lv2/core.lv2/lv2core.ttl7
-rw-r--r--lv2/core.lv2/manifest.ttl4
-rw-r--r--meson/suppressions/meson.build3
-rw-r--r--plugins/.clang-tidy1
-rw-r--r--plugins/eg-sampler.lv2/uris.h2
-rw-r--r--test/headers/.clang-tidy4
-rw-r--r--test/test_atom.c8
12 files changed, 25 insertions, 15 deletions
diff --git a/.clang-tidy b/.clang-tidy
index ae712c5..4033a55 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -3,6 +3,7 @@
Checks: >
*,
+ -*-macro-to-enum,
-*-magic-numbers,
-altera-*,
-bugprone-assignment-in-if-condition,
@@ -12,7 +13,6 @@ Checks: >
-clang-diagnostic-unused-macros,
-llvmlibc-restrict-system-libc-headers,
-misc-include-cleaner,
- -modernize-macro-to-enum,
-performance-no-int-to-ptr,
-readability-identifier-length,
CheckOptions:
diff --git a/include/lv2/atom/atom.h b/include/lv2/atom/atom.h
index ca607d3..41af21a 100644
--- a/include/lv2/atom/atom.h
+++ b/include/lv2/atom/atom.h
@@ -68,13 +68,13 @@ extern "C" {
@param type The type of the atom, for example LV2_Atom_String.
@param atom A variable-sized atom.
*/
-#define LV2_ATOM_CONTENTS(type, atom) ((void*)((uint8_t*)(atom) + sizeof(type)))
+#define LV2_ATOM_CONTENTS(type, atom) ((void*)((type*)(atom) + 1U))
/**
Const version of LV2_ATOM_CONTENTS.
*/
#define LV2_ATOM_CONTENTS_CONST(type, atom) \
- ((const void*)((const uint8_t*)(atom) + sizeof(type)))
+ ((const void*)((const type*)(atom) + 1U))
/**
Return a pointer to the body of an Atom. The "body" of an atom is the
diff --git a/include/lv2/atom/util.h b/include/lv2/atom/util.h
index a2369da..b8bb295 100644
--- a/include/lv2/atom/util.h
+++ b/include/lv2/atom/util.h
@@ -182,7 +182,7 @@ lv2_atom_sequence_append_event(LV2_Atom_Sequence* seq,
static inline LV2_Atom*
lv2_atom_tuple_begin(const LV2_Atom_Tuple* tup)
{
- return (LV2_Atom*)(LV2_ATOM_BODY(tup));
+ return (LV2_Atom*)tup + 1U;
}
/** Return true iff `i` has reached the end of `body`. */
diff --git a/include/lv2/core/lv2.h b/include/lv2/core/lv2.h
index b085ac5..c70a4c2 100644
--- a/include/lv2/core/lv2.h
+++ b/include/lv2/core/lv2.h
@@ -36,6 +36,7 @@
#define LV2_CORE__AnalyserPlugin LV2_CORE_PREFIX "AnalyserPlugin" ///< http://lv2plug.in/ns/lv2core#AnalyserPlugin
#define LV2_CORE__AudioPort LV2_CORE_PREFIX "AudioPort" ///< http://lv2plug.in/ns/lv2core#AudioPort
#define LV2_CORE__BandpassPlugin LV2_CORE_PREFIX "BandpassPlugin" ///< http://lv2plug.in/ns/lv2core#BandpassPlugin
+#define LV2_CORE__BandstopPlugin LV2_CORE_PREFIX "BandstopPlugin" ///< http://lv2plug.in/ns/lv2core#BandstopPlugin
#define LV2_CORE__CVPort LV2_CORE_PREFIX "CVPort" ///< http://lv2plug.in/ns/lv2core#CVPort
#define LV2_CORE__ChorusPlugin LV2_CORE_PREFIX "ChorusPlugin" ///< http://lv2plug.in/ns/lv2core#ChorusPlugin
#define LV2_CORE__CombPlugin LV2_CORE_PREFIX "CombPlugin" ///< http://lv2plug.in/ns/lv2core#CombPlugin
diff --git a/lv2/core.lv2/lv2core.meta.ttl b/lv2/core.lv2/lv2core.meta.ttl
index e593d2e..77f2c67 100644
--- a/lv2/core.lv2/lv2core.meta.ttl
+++ b/lv2/core.lv2/lv2core.meta.ttl
@@ -126,7 +126,7 @@ If the value has no explicit datatype, it is assumed to be a valid XHTML Basic
1.1 fragment suitable for use as the content of the `body` element of a page.
XHTML Basic is a W3C Recommendation which defines a simplified subset of XHTML
-intended to be reasonable to implement with limited resources, for exampe on
+intended to be reasonable to implement with limited resources, for example on
embedded devices. See [XHTML Basic, Section
3](http://www.w3.org/TR/xhtml-basic/#s_xhtmlmodules) for a list of valid tags.
diff --git a/lv2/core.lv2/lv2core.ttl b/lv2/core.lv2/lv2core.ttl
index e96cede..c7dcf50 100644
--- a/lv2/core.lv2/lv2core.ttl
+++ b/lv2/core.lv2/lv2core.ttl
@@ -524,6 +524,13 @@ lv2:BandpassPlugin
rdfs:label "Bandpass Filter Plugin" ;
rdfs:comment "A filter that attenuates frequencies outside of some band." .
+lv2:BandstopPlugin
+ a rdfs:Class ,
+ owl:Class ;
+ rdfs:subClassOf lv2:FilterPlugin ;
+ rdfs:label "Bandstop Filter Plugin" ;
+ rdfs:comment "A filter that attenuates frequencies inside of some band." .
+
lv2:HighpassPlugin
a rdfs:Class ,
owl:Class ;
diff --git a/lv2/core.lv2/manifest.ttl b/lv2/core.lv2/manifest.ttl
index 27793dc..0072346 100644
--- a/lv2/core.lv2/manifest.ttl
+++ b/lv2/core.lv2/manifest.ttl
@@ -4,8 +4,8 @@
<http://lv2plug.in/ns/lv2core>
a lv2:Specification ;
- lv2:minorVersion 18 ;
- lv2:microVersion 6 ;
+ lv2:minorVersion 19 ;
+ lv2:microVersion 0 ;
rdfs:seeAlso <lv2core.ttl> .
<http://lv2plug.in/ns/lv2>
diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build
index 96ff2ab..9d9a38a 100644
--- a/meson/suppressions/meson.build
+++ b/meson/suppressions/meson.build
@@ -1,4 +1,4 @@
-# Copyright 2020-2023 David Robillard <d@drobilla.net>
+# Copyright 2020-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
# Project-specific warning suppressions
@@ -29,6 +29,7 @@ if is_variable('cc')
'-Wno-reserved-id-macro',
'-Wno-shorten-64-to-32',
'-Wno-sign-conversion',
+ '-Wno-switch-default',
'-Wno-switch-enum',
'-Wno-unsafe-buffer-usage',
]
diff --git a/plugins/.clang-tidy b/plugins/.clang-tidy
index 5fc86ab..44bac70 100644
--- a/plugins/.clang-tidy
+++ b/plugins/.clang-tidy
@@ -5,6 +5,7 @@ Checks: >
-*-narrowing-conversions,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
+ -bugprone-multi-level-implicit-pointer-conversion,
-bugprone-suspicious-realloc-usage,
-cert-err33-c,
-hicpp-signed-bitwise,
diff --git a/plugins/eg-sampler.lv2/uris.h b/plugins/eg-sampler.lv2/uris.h
index f934390..3d3ac10 100644
--- a/plugins/eg-sampler.lv2/uris.h
+++ b/plugins/eg-sampler.lv2/uris.h
@@ -164,7 +164,7 @@ read_set_file(const SamplerURIs* uris, const LV2_Atom_Object* obj)
return NULL;
}
- return (const char*)LV2_ATOM_BODY_CONST(value);
+ return (const char*)&value[1];
}
#endif /* SAMPLER_URIS_H */
diff --git a/test/headers/.clang-tidy b/test/headers/.clang-tidy
index dd0b95f..bf971cc 100644
--- a/test/headers/.clang-tidy
+++ b/test/headers/.clang-tidy
@@ -1,15 +1,15 @@
-# Copyright 2020-2022 David Robillard <d@drobilla.net>
+# Copyright 2020-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
Checks: >
*,
+ -*-macro-to-enum,
-*-magic-numbers,
-altera-*,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-macro-parentheses,
-llvmlibc-restrict-system-libc-headers,
- -modernize-macro-to-enum,
-performance-no-int-to-ptr,
-readability-identifier-length,
CheckOptions:
diff --git a/test/test_atom.c b/test/test_atom.c
index beac05c..421063e 100644
--- a/test/test_atom.c
+++ b/test/test_atom.c
@@ -101,7 +101,7 @@ main(void)
lv2_atom_forge_key(&forge, eg_path);
LV2_Atom_String* path = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_uri(&forge, pstr, pstr_len));
- char* pbody = (char*)LV2_ATOM_BODY(path);
+ char* pbody = (char*)&path[1];
if (!!strcmp(pbody, pstr)) {
return test_fail("%s != \"%s\"\n", pbody, pstr);
}
@@ -112,7 +112,7 @@ main(void)
lv2_atom_forge_key(&forge, eg_uri);
LV2_Atom_String* uri = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_uri(&forge, ustr, ustr_len));
- char* ubody = (char*)LV2_ATOM_BODY(uri);
+ char* ubody = (char*)&uri[1];
if (!!strcmp(ubody, ustr)) {
return test_fail("%s != \"%s\"\n", ubody, ustr);
}
@@ -130,7 +130,7 @@ main(void)
lv2_atom_forge_key(&forge, eg_string);
LV2_Atom_String* string = (LV2_Atom_String*)lv2_atom_forge_deref(
&forge, lv2_atom_forge_string(&forge, "hello", strlen("hello")));
- char* sbody = (char*)LV2_ATOM_BODY(string);
+ char* sbody = (char*)&string[1];
if (!!strcmp(sbody, "hello")) {
return test_fail("%s != \"hello\"\n", sbody);
}
@@ -144,7 +144,7 @@ main(void)
strlen("bonjour"),
0,
urid_map(NULL, "http://lexvo.org/id/term/fr")));
- char* lbody = (char*)LV2_ATOM_CONTENTS(LV2_Atom_Literal, literal);
+ char* lbody = (char*)&literal[1];
if (!!strcmp(lbody, "bonjour")) {
return test_fail("%s != \"bonjour\"\n", lbody);
}