LMMS
Loading...
Searching...
No Matches
juce_AU_Shared.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#ifndef DOXYGEN
27
28// This macro can be set if you need to override this internal name for some reason..
29#ifndef JUCE_STATE_DICTIONARY_KEY
30 #define JUCE_STATE_DICTIONARY_KEY "jucePluginState"
31#endif
32
33namespace juce
34{
35
37{
39 {
40 public:
41 void alloc (AudioProcessor& processor)
42 {
43 const int numInputBuses = AudioUnitHelpers::getBusCount (processor, true);
44 const int numOutputBuses = AudioUnitHelpers::getBusCount (processor, false);
45
46 initializeChannelMapArray (processor, true, numInputBuses);
47 initializeChannelMapArray (processor, false, numOutputBuses);
48
49 for (int busIdx = 0; busIdx < numInputBuses; ++busIdx)
50 fillLayoutChannelMaps (processor, true, busIdx);
51
52 for (int busIdx = 0; busIdx < numOutputBuses; ++busIdx)
53 fillLayoutChannelMaps (processor, false, busIdx);
54 }
55
64
65 inline const int* get (bool input, int bus) const noexcept { return (input ? inputLayoutMap : outputLayoutMap)[bus]; }
66
67 private:
68 //==============================================================================
71 int** inputLayoutMap = nullptr;
72 int** outputLayoutMap = nullptr;
73
74 //==============================================================================
75 void initializeChannelMapArray (AudioProcessor& processor, bool isInput, const int numBuses)
76 {
78 HeapBlock<int>& layoutMapStorage = isInput ? inputLayoutMapStorage : outputLayoutMapStorage;
79 int**& layoutMap = isInput ? inputLayoutMap : outputLayoutMap;
80
81 const int totalInChannels = processor.getTotalNumInputChannels();
82 const int totalOutChannels = processor.getTotalNumOutputChannels();
83
84 layoutMapPtrStorage.calloc (static_cast<size_t> (numBuses));
85 layoutMapStorage.calloc (static_cast<size_t> (isInput ? totalInChannels : totalOutChannels));
86
87 layoutMap = layoutMapPtrStorage.get();
88
89 int ch = 0;
90 for (int busIdx = 0; busIdx < numBuses; ++busIdx)
91 {
92 layoutMap[busIdx] = layoutMapStorage.get() + ch;
93 ch += processor.getChannelCountOfBus (isInput, busIdx);
94 }
95 }
96
97 void fillLayoutChannelMaps (AudioProcessor& processor, bool isInput, int busNr)
98 {
99 int* layoutMap = (isInput ? inputLayoutMap : outputLayoutMap)[busNr];
100 auto channelFormat = processor.getChannelLayoutOfBus (isInput, busNr);
101 AudioChannelLayout coreAudioLayout;
102
103 zerostruct (coreAudioLayout);
104 coreAudioLayout.mChannelLayoutTag = CoreAudioLayouts::toCoreAudio (channelFormat);
105
106 const int numChannels = channelFormat.size();
107 auto coreAudioChannels = CoreAudioLayouts::getCoreAudioLayoutChannels (coreAudioLayout);
108
109 for (int i = 0; i < numChannels; ++i)
110 layoutMap[i] = coreAudioChannels.indexOf (channelFormat.getTypeOfChannel (i));
111 }
112 };
113
114 //==============================================================================
116 {
117 public:
118 void prepare (const AudioProcessor::BusesLayout& layout, int maxFrames)
119 {
120 const auto getChannelOffsets = [] (const auto& range)
121 {
122 std::vector<int> result { 0 };
123
124 for (const auto& bus : range)
125 result.push_back (result.back() + bus.size());
126
127 return result;
128 };
129
130 inputBusOffsets = getChannelOffsets (layout.inputBuses);
131 outputBusOffsets = getChannelOffsets (layout.outputBuses);
132
133 const auto numChannels = jmax (inputBusOffsets.back(), outputBusOffsets.back());
134 scratch.setSize (numChannels, maxFrames);
135 channels.resize (static_cast<size_t> (numChannels), nullptr);
136
137 reset();
138 }
139
140 void release()
141 {
142 scratch.setSize (0, 0);
143 channels = {};
144 inputBusOffsets = outputBusOffsets = std::vector<int>();
145 }
146
147 void reset()
148 {
149 std::fill (channels.begin(), channels.end(), nullptr);
150 }
151
152 float* setBuffer (const int idx, float* ptr = nullptr) noexcept
153 {
154 jassert (idx < scratch.getNumChannels());
155 return channels[(size_t) idx] = uniqueBuffer (idx, ptr);
156 }
157
158 AudioBuffer<float>& getBuffer (UInt32 frames) noexcept
159 {
160 jassert (std::none_of (channels.begin(), channels.end(), [] (auto* x) { return x == nullptr; }));
161
162 const auto channelPtr = channels.empty() ? scratch.getArrayOfWritePointers() : channels.data();
163 mutableBuffer.setDataToReferTo (channelPtr, (int) channels.size(), static_cast<int> (frames));
164
165 return mutableBuffer;
166 }
167
168 void set (int bus, AudioBufferList& bufferList, const int* channelMap) noexcept
169 {
170 if (bufferList.mNumberBuffers <= 0 || ! isPositiveAndBelow (bus, inputBusOffsets.size() - 1))
171 return;
172
173 const auto n = (UInt32) (bufferList.mBuffers[0].mDataByteSize / (bufferList.mBuffers[0].mNumberChannels * sizeof (float)));
174 const auto isInterleaved = isAudioBufferInterleaved (bufferList);
175 const auto numChannels = (int) (isInterleaved ? bufferList.mBuffers[0].mNumberChannels
176 : bufferList.mNumberBuffers);
177
178 for (int ch = 0; ch < numChannels; ++ch)
179 {
180 float* data = channels[(size_t) (inputBusOffsets[(size_t) bus] + ch)];
181
182 const auto mappedChannel = channelMap[ch];
183
184 if (isInterleaved || static_cast<float*> (bufferList.mBuffers[mappedChannel].mData) != data)
185 copyAudioBuffer (bufferList, mappedChannel, n, data);
186 }
187 }
188
189 void get (int bus, AudioBufferList& buffer, const int* channelMap) noexcept
190 {
191 if (buffer.mNumberBuffers <= 0 || ! isPositiveAndBelow (bus, outputBusOffsets.size() - 1))
192 return;
193
194 const auto n = (UInt32) (buffer.mBuffers[0].mDataByteSize / (buffer.mBuffers[0].mNumberChannels * sizeof (float)));
195 const auto isInterleaved = isAudioBufferInterleaved (buffer);
196 const auto numChannels = (int) (isInterleaved ? buffer.mBuffers[0].mNumberChannels
197 : buffer.mNumberBuffers);
198
199 for (int ch = 0; ch < numChannels; ++ch)
200 {
201 float* data = channels[(size_t) (outputBusOffsets[(size_t) bus] + ch)];
202
203 const auto mappedChannel = channelMap[ch];
204
205 if (data == buffer.mBuffers[mappedChannel].mData && ! isInterleaved)
206 continue; // no copying necessary
207
208 if (buffer.mBuffers[mappedChannel].mData == nullptr && ! isInterleaved)
209 buffer.mBuffers[mappedChannel].mData = data;
210 else
211 copyAudioBuffer (data, mappedChannel, n, buffer);
212 }
213 }
214
215 void clearInputBus (int index, int bufferLength)
216 {
217 if (isPositiveAndBelow (index, inputBusOffsets.size() - 1))
218 clearChannels ({ inputBusOffsets[(size_t) index], inputBusOffsets[(size_t) (index + 1)] }, bufferLength);
219 }
220
221 void clearUnusedChannels (int bufferLength)
222 {
223 jassert (! inputBusOffsets .empty());
224 jassert (! outputBusOffsets.empty());
225
226 clearChannels ({ inputBusOffsets.back(), outputBusOffsets.back() }, bufferLength);
227 }
228
229 private:
230 void clearChannels (Range<int> range, int bufferLength)
231 {
232 jassert (bufferLength <= scratch.getNumSamples());
233
234 if (range.getEnd() <= (int) channels.size())
235 {
236 std::for_each (channels.begin() + range.getStart(),
237 channels.begin() + range.getEnd(),
238 [bufferLength] (float* ptr) { zeromem (ptr, sizeof (float) * (size_t) bufferLength); });
239 }
240 }
241
242 float* uniqueBuffer (int idx, float* buffer) noexcept
243 {
244 if (buffer == nullptr)
245 return scratch.getWritePointer (idx);
246
247 for (int ch = 0; ch < idx; ++ch)
248 if (buffer == channels[(size_t) ch])
249 return scratch.getWritePointer (idx);
250
251 return buffer;
252 }
253
254 //==============================================================================
256 std::vector<float*> channels;
258 };
259
260 static bool isAudioBufferInterleaved (const AudioBufferList& audioBuffer) noexcept
261 {
262 return (audioBuffer.mNumberBuffers == 1 && audioBuffer.mBuffers[0].mNumberChannels > 1);
263 }
264
265 static void clearAudioBuffer (const AudioBufferList& audioBuffer) noexcept
266 {
267 for (unsigned int ch = 0; ch < audioBuffer.mNumberBuffers; ++ch)
268 zeromem (audioBuffer.mBuffers[ch].mData, audioBuffer.mBuffers[ch].mDataByteSize);
269 }
270
271 static void copyAudioBuffer (const AudioBufferList& audioBuffer, const int channel, const UInt32 size, float* dst) noexcept
272 {
273 if (! isAudioBufferInterleaved (audioBuffer))
274 {
275 jassert (channel < static_cast<int> (audioBuffer.mNumberBuffers));
276 jassert (audioBuffer.mBuffers[channel].mDataByteSize == (size * sizeof (float)));
277
278 memcpy (dst, audioBuffer.mBuffers[channel].mData, size * sizeof (float));
279 }
280 else
281 {
282 const int numChannels = static_cast<int> (audioBuffer.mBuffers[0].mNumberChannels);
283 const UInt32 n = static_cast<UInt32> (numChannels) * size;
284 const float* src = static_cast<const float*> (audioBuffer.mBuffers[0].mData);
285
286 jassert (channel < numChannels);
287 jassert (audioBuffer.mBuffers[0].mDataByteSize == (n * sizeof (float)));
288
289 for (const float* inData = src; inData < (src + n); inData += numChannels)
290 *dst++ = inData[channel];
291 }
292 }
293
294 static void copyAudioBuffer (const float *src, const int channel, const UInt32 size, AudioBufferList& audioBuffer) noexcept
295 {
296 if (! isAudioBufferInterleaved (audioBuffer))
297 {
298 jassert (channel < static_cast<int> (audioBuffer.mNumberBuffers));
299 jassert (audioBuffer.mBuffers[channel].mDataByteSize == (size * sizeof (float)));
300
301 memcpy (audioBuffer.mBuffers[channel].mData, src, size * sizeof (float));
302 }
303 else
304 {
305 const int numChannels = static_cast<int> (audioBuffer.mBuffers[0].mNumberChannels);
306 const UInt32 n = static_cast<UInt32> (numChannels) * size;
307 float* dst = static_cast<float*> (audioBuffer.mBuffers[0].mData);
308
309 jassert (channel < numChannels);
310 jassert (audioBuffer.mBuffers[0].mDataByteSize == (n * sizeof (float)));
311
312 for (float* outData = dst; outData < (dst + n); outData += numChannels)
313 outData[channel] = *src++;
314 }
315 }
316
317 template <size_t numLayouts>
318 static bool isLayoutSupported (const AudioProcessor& processor,
319 bool isInput, int busIdx,
320 int numChannels,
321 const short (&channelLayoutList)[numLayouts][2],
322 bool hasLayoutMap = true)
323 {
324 if (const AudioProcessor::Bus* bus = processor.getBus (isInput, busIdx))
325 {
326 if (! bus->isNumberOfChannelsSupported (numChannels))
327 return false;
328
329 if (! hasLayoutMap)
330 return true;
331
332 const int numConfigs = sizeof (channelLayoutList) / sizeof (short[2]);
333
334 for (int i = 0; i < numConfigs; ++i)
335 {
336 if (channelLayoutList[i][isInput ? 0 : 1] == numChannels)
337 return true;
338 }
339 }
340
341 return false;
342 }
343
345 {
346 Array<AUChannelInfo> channelInfo;
347
348 auto hasMainInputBus = (AudioUnitHelpers::getBusCountForWrapper (processor, true) > 0);
349 auto hasMainOutputBus = (AudioUnitHelpers::getBusCountForWrapper (processor, false) > 0);
350
351 if ((! hasMainInputBus) && (! hasMainOutputBus))
352 {
353 // midi effect plug-in: no audio
354 AUChannelInfo info;
355 info.inChannels = 0;
356 info.outChannels = 0;
357
358 return { &info, 1 };
359 }
360
361 auto layout = processor.getBusesLayout();
362 auto maxNumChanToCheckFor = 9;
363
364 auto defaultInputs = processor.getChannelCountOfBus (true, 0);
365 auto defaultOutputs = processor.getChannelCountOfBus (false, 0);
366
367 struct Channels
368 {
369 SInt16 ins, outs;
370
371 std::pair<SInt16, SInt16> makePair() const noexcept { return std::make_pair (ins, outs); }
372
373 bool operator< (const Channels& other) const noexcept { return makePair() < other.makePair(); }
374 bool operator== (const Channels& other) const noexcept { return makePair() == other.makePair(); }
375 };
376
377 SortedSet<Channels> supportedChannels;
378
379 // add the current configuration
380 if (defaultInputs != 0 || defaultOutputs != 0)
381 supportedChannels.add ({ static_cast<SInt16> (defaultInputs),
382 static_cast<SInt16> (defaultOutputs) });
383
384 for (auto inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum)
385 {
386 auto inLayout = layout;
387
388 if (auto* inBus = processor.getBus (true, 0))
389 if (! isNumberOfChannelsSupported (inBus, inChanNum, inLayout))
390 continue;
391
392 for (auto outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum)
393 {
394 auto outLayout = inLayout;
395
396 if (auto* outBus = processor.getBus (false, 0))
397 if (! isNumberOfChannelsSupported (outBus, outChanNum, outLayout))
398 continue;
399
400 supportedChannels.add ({ static_cast<SInt16> (hasMainInputBus ? outLayout.getMainInputChannels() : 0),
401 static_cast<SInt16> (hasMainOutputBus ? outLayout.getMainOutputChannels() : 0) });
402 }
403 }
404
405 auto hasInOutMismatch = false;
406
407 for (const auto& supported : supportedChannels)
408 {
409 if (supported.ins != supported.outs)
410 {
411 hasInOutMismatch = true;
412 break;
413 }
414 }
415
416 auto hasUnsupportedInput = ! hasMainInputBus, hasUnsupportedOutput = ! hasMainOutputBus;
417
418 for (auto inChanNum = hasMainInputBus ? 1 : 0; inChanNum <= (hasMainInputBus ? maxNumChanToCheckFor : 0); ++inChanNum)
419 {
420 Channels channelConfiguration { static_cast<SInt16> (inChanNum),
421 static_cast<SInt16> (hasInOutMismatch ? defaultOutputs : inChanNum) };
422
423 if (! supportedChannels.contains (channelConfiguration))
424 {
425 hasUnsupportedInput = true;
426 break;
427 }
428 }
429
430 for (auto outChanNum = hasMainOutputBus ? 1 : 0; outChanNum <= (hasMainOutputBus ? maxNumChanToCheckFor : 0); ++outChanNum)
431 {
432 Channels channelConfiguration { static_cast<SInt16> (hasInOutMismatch ? defaultInputs : outChanNum),
433 static_cast<SInt16> (outChanNum) };
434
435 if (! supportedChannels.contains (channelConfiguration))
436 {
437 hasUnsupportedOutput = true;
438 break;
439 }
440 }
441
442 for (const auto& supported : supportedChannels)
443 {
444 AUChannelInfo info;
445
446 // see here: https://developer.apple.com/library/mac/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/TheAudioUnit/TheAudioUnit.html
447 info.inChannels = static_cast<SInt16> (hasMainInputBus ? (hasUnsupportedInput ? supported.ins : (hasInOutMismatch && (! hasUnsupportedOutput) ? -2 : -1)) : 0);
448 info.outChannels = static_cast<SInt16> (hasMainOutputBus ? (hasUnsupportedOutput ? supported.outs : (hasInOutMismatch && (! hasUnsupportedInput) ? -2 : -1)) : 0);
449
450 if (info.inChannels == -2 && info.outChannels == -2)
451 info.inChannels = -1;
452
453 int j;
454 for (j = 0; j < channelInfo.size(); ++j)
455 if (info.inChannels == channelInfo.getReference (j).inChannels
456 && info.outChannels == channelInfo.getReference (j).outChannels)
457 break;
458
459 if (j >= channelInfo.size())
460 channelInfo.add (info);
461 }
462
463 return channelInfo;
464 }
465
466 static bool isNumberOfChannelsSupported (const AudioProcessor::Bus* b, int numChannels, AudioProcessor::BusesLayout& inOutCurrentLayout)
467 {
468 auto potentialSets = AudioChannelSet::channelSetsWithNumberOfChannels (static_cast<int> (numChannels));
469
470 for (auto set : potentialSets)
471 {
472 auto copy = inOutCurrentLayout;
473
474 if (b->isLayoutSupported (set, &copy))
475 {
476 inOutCurrentLayout = copy;
477 return true;
478 }
479 }
480
481 return false;
482 }
483
484 //==============================================================================
485 static int getBusCount (const AudioProcessor& juceFilter, bool isInput)
486 {
487 int busCount = juceFilter.getBusCount (isInput);
488
489 #ifdef JucePlugin_PreferredChannelConfigurations
490 short configs[][2] = {JucePlugin_PreferredChannelConfigurations};
491 const int numConfigs = sizeof (configs) / sizeof (short[2]);
492
493 bool hasOnlyZeroChannels = true;
494
495 for (int i = 0; i < numConfigs && hasOnlyZeroChannels == true; ++i)
496 if (configs[i][isInput ? 0 : 1] != 0)
497 hasOnlyZeroChannels = false;
498
499 busCount = jmin (busCount, hasOnlyZeroChannels ? 0 : 1);
500 #endif
501
502 return busCount;
503 }
504
505 static int getBusCountForWrapper (const AudioProcessor& juceFilter, bool isInput)
506 {
507 #if JucePlugin_IsMidiEffect
508 const auto numRequiredBuses = isInput ? 0 : 1;
509 #else
510 const auto numRequiredBuses = 0;
511 #endif
512
513 return jmax (numRequiredBuses, getBusCount (juceFilter, isInput));
514 }
515
516 static bool setBusesLayout (AudioProcessor* juceFilter, const AudioProcessor::BusesLayout& requestedLayouts)
517 {
518 #ifdef JucePlugin_PreferredChannelConfigurations
519 AudioProcessor::BusesLayout copy (requestedLayouts);
520
521 for (int dir = 0; dir < 2; ++dir)
522 {
523 const bool isInput = (dir == 0);
524
525 const int actualBuses = juceFilter->getBusCount (isInput);
526 const int auNumBuses = getBusCount (*juceFilter, isInput);
527 Array<AudioChannelSet>& buses = (isInput ? copy.inputBuses : copy.outputBuses);
528
529 for (int i = auNumBuses; i < actualBuses; ++i)
531 }
532
533 return juceFilter->setBusesLayout (copy);
534 #else
535 return juceFilter->setBusesLayout (requestedLayouts);
536 #endif
537 }
538
540 {
541 #ifdef JucePlugin_PreferredChannelConfigurations
542 AudioProcessor::BusesLayout layout = juceFilter->getBusesLayout();
543
544 for (int dir = 0; dir < 2; ++dir)
545 {
546 const bool isInput = (dir == 0);
547
548 const int actualBuses = juceFilter->getBusCount (isInput);
549 const int auNumBuses = getBusCount (*juceFilter, isInput);
550 auto& buses = (isInput ? layout.inputBuses : layout.outputBuses);
551
552 for (int i = auNumBuses; i < actualBuses; ++i)
553 buses.removeLast();
554 }
555
556 return layout;
557 #else
558 return juceFilter->getBusesLayout();
559 #endif
560 }
561};
562
563} // namespace juce
564
565#endif
#define copy(x)
Definition ADnoteParameters.cpp:1011
Type jmin(const Type a, const Type b)
Definition MathsFunctions.h:60
Type jmax(const Type a, const Type b)
Definition MathsFunctions.h:48
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_Array.h:56
int size() const noexcept
Definition juce_Array.h:215
void add(const ElementType &newElement)
Definition juce_Array.h:418
ElementType & getReference(int index) noexcept
Definition juce_Array.h:267
Definition juce_AudioSampleBuffer.h:34
static AudioChannelSet JUCE_CALLTYPE disabled()
Definition juce_AudioChannelSet.cpp:450
static Array< AudioChannelSet > JUCE_CALLTYPE channelSetsWithNumberOfChannels(int numChannels)
Definition juce_AudioChannelSet.cpp:539
Definition juce_AudioProcessor.h:361
Definition juce_AudioProcessor.h:46
int getTotalNumInputChannels() const noexcept
Definition juce_AudioProcessor.h:733
Bus * getBus(bool isInput, int busIndex) noexcept
Definition juce_AudioProcessor.h:509
BusesLayout getBusesLayout() const
Definition juce_AudioProcessor.cpp:171
int getBusCount(bool isInput) const noexcept
Definition juce_AudioProcessor.h:504
int getChannelCountOfBus(bool isInput, int busIndex) const noexcept
Definition juce_AudioProcessor.h:616
AudioChannelSet getChannelLayoutOfBus(bool isInput, int busIndex) const noexcept
Definition juce_AudioProcessor.cpp:181
int getTotalNumOutputChannels() const noexcept
Definition juce_AudioProcessor.h:747
bool setBusesLayout(const BusesLayout &)
Definition juce_AudioProcessor.cpp:111
Definition juce_AU_Shared.h:39
void alloc(AudioProcessor &processor)
Definition juce_AU_Shared.h:41
void initializeChannelMapArray(AudioProcessor &processor, bool isInput, const int numBuses)
Definition juce_AU_Shared.h:75
HeapBlock< int * > outputLayoutMapPtrStorage
Definition juce_AU_Shared.h:69
HeapBlock< int > outputLayoutMapStorage
Definition juce_AU_Shared.h:70
const int * get(bool input, int bus) const noexcept
Definition juce_AU_Shared.h:65
void fillLayoutChannelMaps(AudioProcessor &processor, bool isInput, int busNr)
Definition juce_AU_Shared.h:97
int ** outputLayoutMap
Definition juce_AU_Shared.h:72
HeapBlock< int > inputLayoutMapStorage
Definition juce_AU_Shared.h:70
void release()
Definition juce_AU_Shared.h:56
int ** inputLayoutMap
Definition juce_AU_Shared.h:71
HeapBlock< int * > inputLayoutMapPtrStorage
Definition juce_AU_Shared.h:69
Definition juce_AU_Shared.h:116
void prepare(const AudioProcessor::BusesLayout &layout, int maxFrames)
Definition juce_AU_Shared.h:118
AudioBuffer< float > & getBuffer(UInt32 frames) noexcept
Definition juce_AU_Shared.h:158
void set(int bus, AudioBufferList &bufferList, const int *channelMap) noexcept
Definition juce_AU_Shared.h:168
std::vector< int > inputBusOffsets
Definition juce_AU_Shared.h:257
AudioBuffer< float > scratch
Definition juce_AU_Shared.h:255
void clearInputBus(int index, int bufferLength)
Definition juce_AU_Shared.h:215
float * uniqueBuffer(int idx, float *buffer) noexcept
Definition juce_AU_Shared.h:242
void clearUnusedChannels(int bufferLength)
Definition juce_AU_Shared.h:221
AudioBuffer< float > mutableBuffer
Definition juce_AU_Shared.h:255
void clearChannels(Range< int > range, int bufferLength)
Definition juce_AU_Shared.h:230
std::vector< int > outputBusOffsets
Definition juce_AU_Shared.h:257
float * setBuffer(const int idx, float *ptr=nullptr) noexcept
Definition juce_AU_Shared.h:152
std::vector< float * > channels
Definition juce_AU_Shared.h:256
void get(int bus, AudioBufferList &buffer, const int *channelMap) noexcept
Definition juce_AU_Shared.h:189
void release()
Definition juce_AU_Shared.h:140
void reset()
Definition juce_AU_Shared.h:147
Definition juce_HeapBlock.h:87
ElementType * get() const noexcept
Definition juce_HeapBlock.h:188
void calloc(SizeType newNumElements, const size_t elementSize=sizeof(ElementType))
Definition juce_HeapBlock.h:263
Definition juce_Range.h:40
constexpr ValueType getStart() const noexcept
Definition juce_Range.h:80
constexpr ValueType getEnd() const noexcept
Definition juce_Range.h:86
Definition juce_SortedSet.h:54
bool add(const ElementType &newElement) noexcept
Definition juce_SortedSet.h:271
bool contains(const ElementType &elementToLookFor) const noexcept
Definition juce_SortedSet.h:254
register unsigned j
Definition inflate.c:1576
register unsigned i
Definition inflate.c:1575
unsigned x[BMAX+1]
Definition inflate.c:1586
struct backing_store_struct * info
Definition jmemsys.h:183
JSAMPIMAGE data
Definition jpeglib.h:945
#define jassert(expression)
Definition carla_juce.cpp:31
void zerostruct(Type &structure) noexcept
Definition juce_Memory.h:32
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 void func jack_client_t const char const char unsigned long flags const jack_port_t port jack_client_t jack_port_id_t port_id const jack_port_t const char port_name const jack_port_t port void * ptr
Definition juce_linux_JackAudio.cpp:79
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Definition juce_MathsFunctions.h:279
void zeromem(void *memory, size_t numBytes) noexcept
Definition juce_Memory.h:28
Definition juce_AudioProcessor.h:311
Array< AudioChannelSet > outputBuses
Definition juce_AudioProcessor.h:316
Array< AudioChannelSet > inputBuses
Definition juce_AudioProcessor.h:313
Definition juce_AU_Shared.h:37
static AudioProcessor::BusesLayout getBusesLayout(const AudioProcessor *juceFilter)
Definition juce_AU_Shared.h:539
static bool setBusesLayout(AudioProcessor *juceFilter, const AudioProcessor::BusesLayout &requestedLayouts)
Definition juce_AU_Shared.h:516
static void clearAudioBuffer(const AudioBufferList &audioBuffer) noexcept
Definition juce_AU_Shared.h:265
static int getBusCountForWrapper(const AudioProcessor &juceFilter, bool isInput)
Definition juce_AU_Shared.h:505
static int getBusCount(const AudioProcessor &juceFilter, bool isInput)
Definition juce_AU_Shared.h:485
static bool isAudioBufferInterleaved(const AudioBufferList &audioBuffer) noexcept
Definition juce_AU_Shared.h:260
static bool isNumberOfChannelsSupported(const AudioProcessor::Bus *b, int numChannels, AudioProcessor::BusesLayout &inOutCurrentLayout)
Definition juce_AU_Shared.h:466
static bool isLayoutSupported(const AudioProcessor &processor, bool isInput, int busIdx, int numChannels, const short(&channelLayoutList)[numLayouts][2], bool hasLayoutMap=true)
Definition juce_AU_Shared.h:318
static void copyAudioBuffer(const float *src, const int channel, const UInt32 size, AudioBufferList &audioBuffer) noexcept
Definition juce_AU_Shared.h:294
static Array< AUChannelInfo > getAUChannelInfo(const AudioProcessor &processor)
Definition juce_AU_Shared.h:344
static void copyAudioBuffer(const AudioBufferList &audioBuffer, const int channel, const UInt32 size, float *dst) noexcept
Definition juce_AU_Shared.h:271
int n
Definition crypt.c:458
memcpy(hh, h, RAND_HEAD_LEN)
b
Definition crypt.c:628
ulg size
Definition extract.c:2350
int result
Definition process.c:1455
typedef int(UZ_EXP MsgFn)()