LMMS
Loading...
Searching...
No Matches
juce_LV2Common.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26#pragma once
27
28#ifndef DOXYGEN
29
30#include "juce_lv2_config.h"
31
32#ifdef Bool
33 #undef Bool // previously defined in X11/Xlib.h
34#endif
35
36#ifdef verify
37 #undef verify // previously defined in macOS 10.11 SDK
38#endif
39
40JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wzero-as-null-pointer-constant",
41 "-Wcast-align",
42 "-Wparentheses",
43 "-Wnullability-extension",
44 "-Wsign-conversion")
45
46extern "C"
47{
48 #include "lilv/lilv/lilv.h"
49 #include "lv2/atom/atom.h"
50 #include "lv2/atom/forge.h"
51 #include "lv2/atom/util.h"
56 #include "lv2/log/log.h"
57 #include "lv2/midi/midi.h"
58 #include "lv2/options/options.h"
60 #include "lv2/patch/patch.h"
62 #include "lv2/presets/presets.h"
64 #include "lv2/state/state.h"
65 #include "lv2/time/time.h"
66 #include "lv2/ui/ui.h"
67 #include "lv2/units/units.h"
68 #include "lv2/worker/worker.h"
69 #include "serd/serd/serd.h"
70}
71
73
74#include <map>
75#include <type_traits>
76
77namespace juce
78{
79namespace lv2_shared
80{
81
83{
84public:
86 : map { m },
87 chunk { map.map (map.handle, LV2_ATOM__Chunk) }
88 {
90 }
91
92 void setBuffer (void* buf, size_t size)
93 {
94 lv2_atom_forge_set_buffer (&forge, static_cast<uint8_t*> (buf), size);
95 }
96
97 LV2_Atom_Forge* get() { return &forge; }
98 const LV2_Atom_Forge* get() const { return &forge; }
99
104
105private:
109
111};
112
113template <typename Constructor>
115{
116 template <typename... Args>
117 explicit ScopedFrame (LV2_Atom_Forge* f, Args&&... args)
118 : forge (f)
119 {
120 Constructor::construct (forge, &frame, std::forward<Args> (args)...);
121 }
122
124
127
131};
132
133struct SequenceTraits { static constexpr auto construct = lv2_atom_forge_sequence_head; };
134struct ObjectTraits { static constexpr auto construct = lv2_atom_forge_object; };
135
138
140{
141 explicit NumericAtomParser (LV2_URID_Map mapFeatureIn)
142 : mapFeature (mapFeatureIn) {}
143
144 template <typename T> struct Tag { LV2_URID urid; };
145
146 template <typename Target, typename... Types>
147 static Optional<Target> tryParse (const LV2_Atom&, const void*)
148 {
149 return {};
150 }
151
152 template <typename Target, typename Head, typename... Tail>
153 static Optional<Target> tryParse (const LV2_Atom& atom, const void* data, Tag<Head> head, Tag<Tail>... tail)
154 {
155 if (atom.type == head.urid && atom.size == sizeof (Head))
156 return static_cast<Target> (*reinterpret_cast<const Head*> (data));
157
158 return tryParse<Target> (atom, data, tail...);
159 }
160
161 template <typename Target>
162 Optional<Target> parseNumericAtom (const LV2_Atom* atom, const void* data) const
163 {
164 if (atom == nullptr)
165 return {};
166
167 return tryParse<Target> (*atom,
168 data,
169 Tag<int32_t> { mLV2_ATOM__Bool },
170 Tag<int32_t> { mLV2_ATOM__Int },
171 Tag<int64_t> { mLV2_ATOM__Long },
172 Tag<float> { mLV2_ATOM__Float },
173 Tag<double> { mLV2_ATOM__Double });
174 }
175
176 template <typename Target>
178 {
179 return parseNumericAtom<Target> (atom, atom + 1);
180 }
181
182 template <typename Target>
184 {
185 if (option != nullptr)
186 {
187 const LV2_Atom atom { option->size, option->type };
188 return parseNumericAtom<Target> (&atom, option->value);
189 }
190
191 return {};
192 }
193
194 LV2_URID map (const char* str) const { return mapFeature.map (mapFeature.handle, str); }
195
197 #define X(str) const LV2_URID m##str = map (str);
203 #undef X
204
205 JUCE_LEAK_DETECTOR (NumericAtomParser)
206};
207
208//==============================================================================
210{
211 PatchSetHelper (LV2_URID_Map mapFeatureIn, const char* pluginUri)
212 : parser (mapFeatureIn),
213 pluginUrid (parser.map (pluginUri))
214 {}
215
216 bool isPlugin (const LV2_Atom* subject) const
217 {
218 if (subject == nullptr)
219 return true;
220
221 return subject->type == mLV2_ATOM__URID
222 && reinterpret_cast<const LV2_Atom_URID*> (subject)->body == pluginUrid;
223 }
224
225 template <typename Callback>
226 void processPatchSet (const LV2_Atom_Object* object, Callback&& callback)
227 {
228 if (object->body.otype != mLV2_PATCH__Set)
229 return;
230
231 const LV2_Atom* subject = nullptr;
232 const LV2_Atom* property = nullptr;
233 const LV2_Atom* value = nullptr;
234
235 LV2_Atom_Object_Query query[] { { mLV2_PATCH__subject, &subject },
236 { mLV2_PATCH__property, &property },
237 { mLV2_PATCH__value, &value },
239
241
242 if (! isPlugin (subject))
243 return;
244
245 setPluginProperty (property, value, std::forward<Callback> (callback));
246 }
247
248 template <typename Callback>
249 void processPatchSet (const LV2_Atom_Event* event, Callback&& callback)
250 {
251 if (event->body.type == mLV2_ATOM__Object)
252 processPatchSet (reinterpret_cast<const LV2_Atom_Object*> (&event->body), std::forward<Callback> (callback));
253 }
254
255 template <typename Callback>
256 void setPluginProperty (const LV2_Atom* property, const LV2_Atom* value, Callback&& callback)
257 {
258 if (property == nullptr)
259 {
260 // No property was supplied.
262 return;
263 }
264
265 if (property->type != mLV2_ATOM__URID)
266 {
267 // Set property is not a URID.
269 return;
270 }
271
272 const auto parseResult = parser.parseNumericAtom<float> (value);
273
274 if (! parseResult.hasValue())
275 {
276 // Didn't understand the type of this atom.
278 return;
279 }
280
281 callback.setParameter (reinterpret_cast<const LV2_Atom_URID*> (property)->body, *parseResult);
282 }
283
286 #define X(str) const LV2_URID m##str = parser.map (str);
294 #undef X
295
297};
298
299//==============================================================================
300template <typename Traits>
302{
303 using Container = typename Traits::Container;
304 using Iter = typename Traits::Iter;
305
306public:
307 using difference_type = ptrdiff_t;
308 using value_type = decltype (Traits::get (std::declval<Container>(), std::declval<Iter>()));
311 using iterator_category = std::input_iterator_tag;
312
314 Iterator() = default;
315
318 : container (p), iter (testEnd (Traits::begin (container))) {}
319
320 Iterator begin() const noexcept { return *this; }
321 Iterator end() const noexcept { return {}; }
322
323 bool operator== (const Iterator& other) const noexcept
324 {
325 return iter == nullptr && other.iter == nullptr;
326 }
327
328 bool operator!= (const Iterator& other) const noexcept
329 {
330 return ! operator== (other);
331 }
332
334 {
335 iter = testEnd (Traits::next (container, iter));
336 return *this;
337 }
338
339 Iterator operator++ (int)
340 {
341 auto copy = *this;
342 ++(*this);
343 return copy;
344 }
345
347 {
348 return Traits::get (container, iter);
349 }
350
351private:
352 Iter testEnd (Iter i) const noexcept
353 {
354 return Traits::isEnd (container, i) ? Iter{} : i;
355 }
356
359};
360
361//==============================================================================
363{
364 SequenceWithSize() = default;
365
366 SequenceWithSize (const LV2_Atom_Sequence_Body* bodyIn, size_t sizeIn)
367 : body (bodyIn), size (sizeIn) {}
368
369 explicit SequenceWithSize (const LV2_Atom_Sequence* sequence)
370 : body (&sequence->body), size (sequence->atom.size) {}
371
372 const LV2_Atom_Sequence_Body* body = nullptr;
373 size_t size = 0;
374
376};
377
379{
382
383 static LV2_Atom_Event* begin (const Container& s) noexcept
384 {
385 return lv2_atom_sequence_begin (s.body);
386 }
387
388 static LV2_Atom_Event* next (const Container&, Iter it) noexcept
389 {
390 return lv2_atom_sequence_next (it);
391 }
392
393 static bool isEnd (const Container& s, Iter it) noexcept
394 {
395 return lv2_atom_sequence_is_end (s.body, static_cast<uint32_t> (s.size), it);
396 }
397
398 static LV2_Atom_Event* get (const Container&, Iter e) noexcept { return e; }
399};
400
402
417
418/* Useful for converting a `void*` to another type (X11 Window, function pointer etc.) without
419 invoking UB.
420*/
421template <typename OtherWordType, typename Word>
422static auto wordCast (Word word)
423{
424 static_assert (sizeof (word) == sizeof (OtherWordType), "Word sizes must match");
426}
427
428//==============================================================================
430{
434
435 auto tie() const { return std::tie (index, designation, optional); }
436 bool operator== (const SinglePortInfo& other) const { return tie() == other.tie(); }
437 bool operator< (const SinglePortInfo& other) const { return index < other.index; }
438};
439
441{
443 std::set<SinglePortInfo> info;
444
445 auto tie() const { return std::tie (uid, info); }
446 bool operator== (const ParsedGroup& other) const { return tie() == other.tie(); }
447
448 static AudioChannelSet getEquivalentSet (const std::set<SinglePortInfo>& info)
449 {
450 const auto hasUnknownKind = [] (const SinglePortInfo& i) { return i.designation == AudioChannelSet::unknown; };
451
452 if (std::any_of (info.begin(), info.end(), hasUnknownKind))
453 return AudioChannelSet::discreteChannels ((int) info.size());
454
456
457 for (const auto& port : info)
458 result.addChannel (port.designation);
459
460 return result;
461 }
462
464
465 bool isRequired() const
466 {
467 const auto getRequired = [] (const SinglePortInfo& i) { return ! i.optional; };
468 return std::any_of (info.begin(), info.end(), getRequired);
469 }
470
471 bool isCompatible (const AudioChannelSet& requestedBus) const
472 {
473 return requestedBus == getEquivalentSet() || (! isRequired() && requestedBus.isDisabled());
474 }
475};
476
478{
479 std::vector<ParsedGroup> inputs, outputs;
480};
481
483{
484public:
486 : PortToAudioBufferMap ({ layout.inputBuses, buses.inputs },
487 { layout.outputBuses, buses.outputs })
488 {}
489
491 {
492 const auto it = ports.find (port);
493 return it != ports.end() ? it->second : -1;
494 }
495
496private:
498 const std::vector<ParsedGroup>& client)
499 : ports (getPortLayout (host, client))
500 {}
501
503 const PortToAudioBufferMap& outputs)
504 {
505 ports.insert (inputs.ports.begin(), inputs.ports.end());
506 ports.insert (outputs.ports.begin(), outputs.ports.end());
507
508 // If this assertion is hit, some ports have duplicate indices
509 jassert (ports.size() == inputs.ports.size() + outputs.ports.size());
510 }
511
512 static std::map<uint32_t, int> getPortLayout (const Array<AudioChannelSet>& layout,
513 const std::vector<ParsedGroup>& parsedGroup)
514 {
515 if ((int) parsedGroup.size() != layout.size())
516 {
517 // Something has gone very wrong when computing/applying bus layouts!
519 return {};
520 }
521
522 std::map<uint32_t, int> result;
523 int channelOffsetOfBus = 0;
524 auto groupIterator = parsedGroup.begin();
525
526 for (const auto& bus : layout)
527 {
528 const auto& group = groupIterator->info;
529
530 for (const auto& port : group)
531 {
532 const auto index = bus.getChannelIndexForType (port.designation);
533
534 if (index >= 0)
535 result.emplace (port.index, channelOffsetOfBus + index);
536 }
537
538 channelOffsetOfBus += bus.size();
539 ++groupIterator;
540 }
541
542 if ((int) result.size() != channelOffsetOfBus)
543 {
545 return {};
546 }
547
548 return result;
549 }
550
551 std::map<uint32_t, int> ports;
552
554};
555
556// This will convert some grouped and ungrouped ports into a single collection of
557// buses with a stable order.
558// If any group has been marked as the main group, this will be placed first in the
559// collection of results. The remaining groups will be sorted according to the
560// indices of their ports.
561// If there are no groups, all mandatory ports will be grouped into the first bus,
562// and all remaining optional ports will have a separate bus each.
563static inline std::vector<ParsedGroup> findStableBusOrder (const String& mainGroupUid,
564 const std::map<String, std::set<SinglePortInfo>>& groupedPorts,
565 const std::set<SinglePortInfo>& ungroupedPorts)
566{
567 if (groupedPorts.empty())
568 {
569 std::vector<ParsedGroup> result;
570
571 ParsedGroup mandatoryPorts;
572
573 for (const auto& port : ungroupedPorts)
574 if (! port.optional)
575 mandatoryPorts.info.insert (port);
576
577 if (! mandatoryPorts.info.empty())
578 result.push_back (std::move (mandatoryPorts));
579
580 for (const auto& port : ungroupedPorts)
581 if (port.optional)
582 result.push_back ({ String{}, { port } });
583
584 return result;
585 }
586
587 std::vector<ParsedGroup> result;
588
589 const auto pushGroup = [&] (const std::pair<String, std::set<SinglePortInfo>>& info)
590 {
591 result.push_back ({ info.first, info.second });
592 };
593
594 const auto mainGroupIterator = groupedPorts.find (mainGroupUid);
595
596 if (mainGroupIterator != groupedPorts.end())
597 pushGroup (*mainGroupIterator);
598
599 for (auto it = groupedPorts.begin(); it != groupedPorts.end(); ++it)
600 if (it != mainGroupIterator)
601 pushGroup (*it);
602
603 for (const auto& info : ungroupedPorts)
604 result.push_back ({ String{}, { info } });
605
606 if (! result.empty())
607 {
608 // It is an error for the same port to be a member of multiple groups.
609 // Therefore, a standard sort will always be stable, and we don't need to
610 // use an explicitly stable sort.
611 const auto compare = [] (const ParsedGroup& a, const ParsedGroup& b) { return a.info < b.info; };
612 std::sort (std::next (result.begin()), result.end(), compare);
613 }
614
615 return result;
616}
617
618}
619}
620
621#endif
#define copy(x)
Definition ADnoteParameters.cpp:1011
#define noexcept
Definition DistrhoDefines.h:72
uint8_t a
Definition Spc_Cpu.h:141
Definition juce_Array.h:56
int size() const noexcept
Definition juce_Array.h:215
Definition juce_AudioChannelSet.h:47
bool isDisabled() const noexcept
Definition juce_AudioChannelSet.h:451
ChannelType
Definition juce_AudioChannelSet.h:317
@ right
Definition juce_AudioChannelSet.h:322
@ surround
Definition juce_AudioChannelSet.h:332
@ unknown
Definition juce_AudioChannelSet.h:318
@ centre
Definition juce_AudioChannelSet.h:323
@ rightSurroundRear
Definition juce_AudioChannelSet.h:344
@ rightSurroundSide
Definition juce_AudioChannelSet.h:334
@ rightCentre
Definition juce_AudioChannelSet.h:330
@ leftCentre
Definition juce_AudioChannelSet.h:329
@ leftSurroundSide
Definition juce_AudioChannelSet.h:333
@ leftSurroundRear
Definition juce_AudioChannelSet.h:343
@ left
Definition juce_AudioChannelSet.h:321
@ LFE
Definition juce_AudioChannelSet.h:326
static AudioChannelSet JUCE_CALLTYPE discreteChannels(int numChannels)
Definition juce_AudioChannelSet.cpp:504
Definition juce_Optional.h:74
Definition juce_String.h:53
LV2_Atom_Forge forge
Definition juce_LV2Common.h:107
const LV2_Atom_Forge * get() const
Definition juce_LV2Common.h:98
AtomForge(LV2_URID_Map m)
Definition juce_LV2Common.h:85
const LV2_URID chunk
Definition juce_LV2Common.h:108
LV2_Atom_Forge * get()
Definition juce_LV2Common.h:97
LV2_URID_Map map
Definition juce_LV2Common.h:106
void setBuffer(void *buf, size_t size)
Definition juce_LV2Common.h:92
void writeChunk(uint32_t size)
Definition juce_LV2Common.h:100
Definition juce_LV2Common.h:302
Iterator & operator++()
Definition juce_LV2Common.h:333
value_type * pointer
Definition juce_LV2Common.h:309
decltype(Traits::get(std::declval< Container >(), std::declval< Iter >())) value_type
Definition juce_LV2Common.h:308
value_type reference
Definition juce_LV2Common.h:310
reference operator*() const noexcept
Definition juce_LV2Common.h:346
Iterator begin() const noexcept
Definition juce_LV2Common.h:320
ptrdiff_t difference_type
Definition juce_LV2Common.h:307
Iterator(Container p) noexcept
Definition juce_LV2Common.h:317
typename Traits::Container Container
Definition juce_LV2Common.h:303
Container container
Definition juce_LV2Common.h:357
Iter iter
Definition juce_LV2Common.h:358
Iter testEnd(Iter i) const noexcept
Definition juce_LV2Common.h:352
Iterator end() const noexcept
Definition juce_LV2Common.h:321
std::input_iterator_tag iterator_category
Definition juce_LV2Common.h:311
typename Traits::Iter Iter
Definition juce_LV2Common.h:304
static std::map< uint32_t, int > getPortLayout(const Array< AudioChannelSet > &layout, const std::vector< ParsedGroup > &parsedGroup)
Definition juce_LV2Common.h:512
PortToAudioBufferMap(const PortToAudioBufferMap &inputs, const PortToAudioBufferMap &outputs)
Definition juce_LV2Common.h:502
int getChannelForPort(uint32_t port) const
Definition juce_LV2Common.h:490
std::map< uint32_t, int > ports
Definition juce_LV2Common.h:551
PortToAudioBufferMap(const AudioProcessor::BusesLayout &layout, const ParsedBuses &buses)
Definition juce_LV2Common.h:485
PortToAudioBufferMap(const Array< AudioChannelSet > &host, const std::vector< ParsedGroup > &client)
Definition juce_LV2Common.h:497
* e
Definition inflate.c:1404
unsigned * m
Definition inflate.c:1559
register unsigned i
Definition inflate.c:1575
unsigned s
Definition inflate.c:1555
unsigned f
Definition inflate.c:1572
#define LV2_ATOM__Object
http://lv2plug.in/ns/ext/atom#Object
Definition atom.h:47
#define LV2_ATOM__Float
http://lv2plug.in/ns/ext/atom#Float
Definition atom.h:42
#define LV2_ATOM__Chunk
http://lv2plug.in/ns/ext/atom#Chunk
Definition atom.h:39
#define LV2_ATOM__Int
http://lv2plug.in/ns/ext/atom#Int
Definition atom.h:43
#define LV2_ATOM__URID
http://lv2plug.in/ns/ext/atom#URID
Definition atom.h:56
#define LV2_ATOM__Double
http://lv2plug.in/ns/ext/atom#Double
Definition atom.h:40
#define LV2_ATOM__Bool
http://lv2plug.in/ns/ext/atom#Bool
Definition atom.h:38
#define LV2_ATOM__Long
http://lv2plug.in/ns/ext/atom#Long
Definition atom.h:45
static PuglViewHint int value
Definition pugl.h:1708
static void lv2_atom_forge_init(LV2_Atom_Forge *forge, const LV2_URID_Map *map)
Definition atom-forge.h:143
static LV2_Atom_Forge_Ref lv2_atom_forge_sequence_head(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame, uint32_t unit)
Definition atom-forge.h:661
static void lv2_atom_forge_pop(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame)
Definition atom-forge.h:201
static void lv2_atom_forge_set_buffer(LV2_Atom_Forge *forge, uint8_t *buf, size_t size)
Definition atom-forge.h:242
static LV2_Atom_Forge_Ref lv2_atom_forge_atom(LV2_Atom_Forge *forge, uint32_t size, uint32_t type)
Definition atom-forge.h:354
static LV2_Atom_Forge_Ref lv2_atom_forge_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame, LV2_URID id, LV2_URID otype)
Definition atom-forge.h:574
#define LV2_PATCH__Set
http://lv2plug.in/ns/ext/patch#Set
Definition patch.h:47
#define LV2_PATCH__subject
http://lv2plug.in/ns/ext/patch#subject
Definition patch.h:56
#define LV2_PATCH__value
http://lv2plug.in/ns/ext/patch#value
Definition patch.h:58
#define LV2_PATCH__property
http://lv2plug.in/ns/ext/patch#property
Definition patch.h:52
#define LV2_PORT_GROUPS__left
http://lv2plug.in/ns/ext/port-groups#left
Definition port-groups.h:52
#define LV2_PORT_GROUPS__center
http://lv2plug.in/ns/ext/port-groups#center
Definition port-groups.h:47
#define LV2_PORT_GROUPS__rearLeft
http://lv2plug.in/ns/ext/port-groups#rearLeft
Definition port-groups.h:57
#define LV2_PORT_GROUPS__rearRight
http://lv2plug.in/ns/ext/port-groups#rearRight
Definition port-groups.h:58
#define LV2_PORT_GROUPS__rearCenter
http://lv2plug.in/ns/ext/port-groups#rearCenter
Definition port-groups.h:56
#define LV2_PORT_GROUPS__lowFrequencyEffects
http://lv2plug.in/ns/ext/port-groups#lowFrequencyEffects
Definition port-groups.h:53
#define LV2_PORT_GROUPS__centerRight
http://lv2plug.in/ns/ext/port-groups#centerRight
Definition port-groups.h:49
#define LV2_PORT_GROUPS__right
http://lv2plug.in/ns/ext/port-groups#right
Definition port-groups.h:59
#define LV2_PORT_GROUPS__centerLeft
http://lv2plug.in/ns/ext/port-groups#centerLeft
Definition port-groups.h:48
#define LV2_PORT_GROUPS__sideLeft
http://lv2plug.in/ns/ext/port-groups#sideLeft
Definition port-groups.h:62
#define LV2_PORT_GROUPS__sideRight
http://lv2plug.in/ns/ext/port-groups#sideRight
Definition port-groups.h:63
uint32_t LV2_URID
Definition urid.h:58
static const LV2_Atom_Event * lv2_atom_sequence_next(const LV2_Atom_Event *i)
Definition atom-util.h:113
static const LV2_Atom_Event * lv2_atom_sequence_begin(const LV2_Atom_Sequence_Body *body)
Definition atom-util.h:83
static bool lv2_atom_sequence_is_end(const LV2_Atom_Sequence_Body *body, uint32_t size, const LV2_Atom_Event *i)
Definition atom-util.h:104
static const LV2_Atom_Object_Query LV2_ATOM_OBJECT_QUERY_END
Definition atom-util.h:308
static int lv2_atom_object_query(const LV2_Atom_Object *object, LV2_Atom_Object_Query *query)
Definition atom-util.h:336
void * object
Definition jmemsys.h:50
struct backing_store_struct * info
Definition jmemsys.h:183
JSAMPIMAGE data
Definition jpeglib.h:945
#define JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE(...)
Definition juce_CompilerWarnings.h:181
#define JUCE_END_IGNORE_WARNINGS_GCC_LIKE
Definition juce_CompilerWarnings.h:182
#define X(str)
Definition juce_LV2Common.h:197
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition juce_LeakedObjectDetector.h:138
#define jassert(expression)
#define JUCE_DECLARE_NON_MOVEABLE(className)
#define JUCE_DECLARE_NON_COPYABLE(className)
#define jassertfalse
API for Lilv, a lightweight LV2 host library.
API for Serd, a lightweight RDF syntax library.
unsigned int uint32_t
Definition mid.cpp:100
unsigned char uint8_t
Definition mid.cpp:98
Definition juce_LV2Common.h:80
ScopedFrame< ObjectTraits > ObjectFrame
Definition juce_LV2Common.h:137
ScopedFrame< SequenceTraits > SequenceFrame
Definition juce_LV2Common.h:136
const std::map< String, AudioChannelSet::ChannelType > channelDesignationMap
Definition juce_LV2Common.h:404
Iterator< SequenceIteratorTraits > SequenceIterator
Definition juce_LV2Common.h:401
static auto wordCast(Word word)
Definition juce_LV2Common.h:422
static std::vector< ParsedGroup > findStableBusOrder(const String &mainGroupUid, const std::map< String, std::set< SinglePortInfo > > &groupedPorts, const std::set< SinglePortInfo > &ungroupedPorts)
Definition juce_LV2Common.h:563
Definition carla_juce.cpp:31
jack_client_t client jack_client_t client jack_client_t client jack_client_t JackInfoShutdownCallback void arg jack_client_t jack_port_t * port
Definition juce_linux_JackAudio.cpp:65
Type readUnaligned(const void *srcPtr) noexcept
Definition juce_Memory.h:65
jack_client_t * client
Definition juce_linux_JackAudio.cpp:57
@ group
Definition juce_AccessibilityRole.h:61
static int compare(const var &v1, const var &v2)
Definition juce_Variant.cpp:654
short word
Definition private.h:22
Definition atom.h:210
LV2_Atom body
Definition atom.h:216
Definition forge.h:89
Definition atom-forge.h:102
Definition atom-util.h:303
Definition atom.h:204
Definition atom.h:236
Definition atom.h:243
Definition atom.h:139
Definition atom.h:106
uint32_t size
Definition atom.h:107
uint32_t type
Definition atom.h:108
Definition options.h:94
Definition urid.h:69
Definition misc.c:36
Definition juce_AudioProcessor.h:311
Array< AudioChannelSet > inputBuses
Definition juce_AudioProcessor.h:313
Definition juce_LV2Common.h:144
LV2_URID urid
Definition juce_LV2Common.h:144
Definition juce_LV2Common.h:140
LV2_URID map(const char *str) const
Definition juce_LV2Common.h:194
const LV2_URID_Map mapFeature
Definition juce_LV2Common.h:196
NumericAtomParser(LV2_URID_Map mapFeatureIn)
Definition juce_LV2Common.h:141
static Optional< Target > tryParse(const LV2_Atom &atom, const void *data, Tag< Head > head, Tag< Tail >... tail)
Definition juce_LV2Common.h:153
Optional< Target > parseNumericOption(const LV2_Options_Option *option) const
Definition juce_LV2Common.h:183
Optional< Target > parseNumericAtom(const LV2_Atom *atom) const
Definition juce_LV2Common.h:177
Optional< Target > parseNumericAtom(const LV2_Atom *atom, const void *data) const
Definition juce_LV2Common.h:162
static Optional< Target > tryParse(const LV2_Atom &, const void *)
Definition juce_LV2Common.h:147
Definition juce_LV2Common.h:134
static constexpr auto construct
Definition juce_LV2Common.h:134
Definition juce_LV2Common.h:478
std::vector< ParsedGroup > inputs
Definition juce_LV2Common.h:479
std::vector< ParsedGroup > outputs
Definition juce_LV2Common.h:479
Definition juce_LV2Common.h:441
bool isCompatible(const AudioChannelSet &requestedBus) const
Definition juce_LV2Common.h:471
std::set< SinglePortInfo > info
Definition juce_LV2Common.h:443
static AudioChannelSet getEquivalentSet(const std::set< SinglePortInfo > &info)
Definition juce_LV2Common.h:448
AudioChannelSet getEquivalentSet() const noexcept
Definition juce_LV2Common.h:463
String uid
Definition juce_LV2Common.h:442
auto tie() const
Definition juce_LV2Common.h:445
bool isRequired() const
Definition juce_LV2Common.h:465
void setPluginProperty(const LV2_Atom *property, const LV2_Atom *value, Callback &&callback)
Definition juce_LV2Common.h:256
bool isPlugin(const LV2_Atom *subject) const
Definition juce_LV2Common.h:216
PatchSetHelper(LV2_URID_Map mapFeatureIn, const char *pluginUri)
Definition juce_LV2Common.h:211
LV2_URID pluginUrid
Definition juce_LV2Common.h:285
void processPatchSet(const LV2_Atom_Object *object, Callback &&callback)
Definition juce_LV2Common.h:226
NumericAtomParser parser
Definition juce_LV2Common.h:284
void processPatchSet(const LV2_Atom_Event *event, Callback &&callback)
Definition juce_LV2Common.h:249
Definition juce_LV2Common.h:115
~ScopedFrame()
Definition juce_LV2Common.h:123
LV2_Atom_Forge * forge
Definition juce_LV2Common.h:126
ScopedFrame(LV2_Atom_Forge *f, Args &&... args)
Definition juce_LV2Common.h:117
LV2_Atom_Forge_Frame frame
Definition juce_LV2Common.h:125
Definition juce_LV2Common.h:379
SequenceWithSize Container
Definition juce_LV2Common.h:380
static bool isEnd(const Container &s, Iter it) noexcept
Definition juce_LV2Common.h:393
static LV2_Atom_Event * next(const Container &, Iter it) noexcept
Definition juce_LV2Common.h:388
static LV2_Atom_Event * begin(const Container &s) noexcept
Definition juce_LV2Common.h:383
static LV2_Atom_Event * get(const Container &, Iter e) noexcept
Definition juce_LV2Common.h:398
LV2_Atom_Event * Iter
Definition juce_LV2Common.h:381
Definition juce_LV2Common.h:133
static constexpr auto construct
Definition juce_LV2Common.h:133
Definition juce_LV2Common.h:363
size_t size
Definition juce_LV2Common.h:373
SequenceWithSize(const LV2_Atom_Sequence *sequence)
Definition juce_LV2Common.h:369
const LV2_Atom_Sequence_Body * body
Definition juce_LV2Common.h:372
SequenceWithSize(const LV2_Atom_Sequence_Body *bodyIn, size_t sizeIn)
Definition juce_LV2Common.h:366
Definition juce_LV2Common.h:430
AudioChannelSet::ChannelType designation
Definition juce_LV2Common.h:432
bool optional
Definition juce_LV2Common.h:433
uint32_t index
Definition juce_LV2Common.h:431
auto tie() const
Definition juce_LV2Common.h:435
Definition mygetopt.h:88
RECT const char void(* callback)(const char *droppath))) SWELL_API_DEFINE(BOOL
Definition swell-functions.h:1004
uch * p
Definition crypt.c:594
b
Definition crypt.c:628
int query
Definition extract.c:1035
ulg size
Definition extract.c:2350
int result
Definition process.c:1455
#define const
Definition zconf.h:137