LMMS
Loading...
Searching...
No Matches
juce_AudioProcessor.cpp
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
26namespace juce
27{
28
30
35
37 : AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo(), false)
38 .withOutput ("Output", AudioChannelSet::stereo(), false))
39{
40}
41
44{
45 for (auto& layout : ioConfig.inputLayouts) createBus (true, layout);
46 for (auto& layout : ioConfig.outputLayouts) createBus (false, layout);
47
49}
50
52{
53 #if ! JUCE_AUDIOPROCESSOR_NO_GUI
54 {
56
57 // ooh, nasty - the editor should have been deleted before its AudioProcessor.
58 jassert (activeEditor == nullptr);
59 }
60 #endif
61
62 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
63 // This will fail if you've called beginParameterChangeGesture() for one
64 // or more parameters without having made a corresponding call to endParameterChangeGesture...
65 jassert (changingParams.countNumberOfSetBits() == 0);
66 #endif
67}
68
69//==============================================================================
71
72//==============================================================================
73bool AudioProcessor::addBus (bool isInput)
74{
75 if (! canAddBus (isInput))
76 return false;
77
78 BusProperties busesProps;
79
80 if (! canApplyBusCountChange (isInput, true, busesProps))
81 return false;
82
83 createBus (isInput, busesProps);
84 return true;
85}
86
87bool AudioProcessor::removeBus (bool inputBus)
88{
89 auto numBuses = getBusCount (inputBus);
90
91 if (numBuses == 0)
92 return false;
93
94 if (! canRemoveBus (inputBus))
95 return false;
96
97 BusProperties busesProps;
98
99 if (! canApplyBusCountChange (inputBus, false, busesProps))
100 return false;
101
102 auto busIndex = numBuses - 1;
103 auto numChannels = getChannelCountOfBus (inputBus, busIndex);
104 (inputBus ? inputBuses : outputBuses).remove (busIndex);
105
106 audioIOChanged (true, numChannels > 0);
107 return true;
108}
109
110//==============================================================================
112{
113 jassert (arr.inputBuses. size() == getBusCount (true)
114 && arr.outputBuses.size() == getBusCount (false));
115
116 if (arr == getBusesLayout())
117 return true;
118
119 auto copy = arr;
120
122 return false;
123
124 return applyBusLayouts (copy);
125}
126
128{
129 auto numIns = getBusCount (true);
130 auto numOuts = getBusCount (false);
131
132 jassert (arr.inputBuses. size() == numIns
133 && arr.outputBuses.size() == numOuts);
134
135 auto request = arr;
136 auto current = getBusesLayout();
137
138 for (int i = 0; i < numIns; ++i)
139 if (request.getNumChannels (true, i) == 0)
140 request.getChannelSet (true, i) = current.getChannelSet (true, i);
141
142 for (int i = 0; i < numOuts; ++i)
143 if (request.getNumChannels (false, i) == 0)
144 request.getChannelSet (false, i) = current.getChannelSet (false, i);
145
147 return false;
148
149 for (int dir = 0; dir < 2; ++dir)
150 {
151 const bool isInput = (dir != 0);
152
153 for (int i = 0; i < (isInput ? numIns : numOuts); ++i)
154 {
155 auto& bus = *getBus (isInput, i);
156 auto& set = request.getChannelSet (isInput, i);
157
158 if (! bus.isEnabled())
159 {
160 if (! set.isDisabled())
161 bus.lastLayout = set;
162
164 }
165 }
166 }
167
168 return setBusesLayout (request);
169}
170
172{
173 BusesLayout layouts;
174
175 for (auto& i : inputBuses) layouts.inputBuses.add (i->getCurrentLayout());
176 for (auto& i : outputBuses) layouts.outputBuses.add (i->getCurrentLayout());
177
178 return layouts;
179}
180
181AudioChannelSet AudioProcessor::getChannelLayoutOfBus (bool isInput, int busIndex) const noexcept
182{
183 if (auto* bus = (isInput ? inputBuses : outputBuses)[busIndex])
184 return bus->getCurrentLayout();
185
186 return {};
187}
188
189bool AudioProcessor::setChannelLayoutOfBus (bool isInputBus, int busIndex, const AudioChannelSet& layout)
190{
191 if (auto* bus = getBus (isInputBus, busIndex))
192 {
193 auto layouts = bus->getBusesLayoutForLayoutChangeOfBus (layout);
194
195 if (layouts.getChannelSet (isInputBus, busIndex) == layout)
196 return applyBusLayouts (layouts);
197
198 return false;
199 }
200
201 jassertfalse; // busIndex parameter is invalid
202 return false;
203}
204
206{
207 BusesLayout layouts;
208
209 for (auto& i : inputBuses) layouts.inputBuses.add (i->lastLayout);
210 for (auto& i : outputBuses) layouts.outputBuses.add (i->lastLayout);
211
212 return setBusesLayout (layouts);
213}
214
216{
217 if (layouts.inputBuses.size() == inputBuses.size()
218 && layouts.outputBuses.size() == outputBuses.size())
219 return isBusesLayoutSupported (layouts);
220
221 return false;
222}
223
224void AudioProcessor::getNextBestLayout (const BusesLayout& desiredLayout, BusesLayout& actualLayouts) const
225{
226 // if you are hitting this assertion then you are requesting a next
227 // best layout which does not have the same number of buses as the
228 // audio processor.
229 jassert (desiredLayout.inputBuses.size() == inputBuses.size()
230 && desiredLayout.outputBuses.size() == outputBuses.size());
231
232 if (checkBusesLayoutSupported (desiredLayout))
233 {
234 actualLayouts = desiredLayout;
235 return;
236 }
237
238 auto originalState = actualLayouts;
239 auto currentState = originalState;
240 auto bestSupported = currentState;
241
242 for (int dir = 0; dir < 2; ++dir)
243 {
244 const bool isInput = (dir > 0);
245
246 auto& currentLayouts = (isInput ? currentState.inputBuses : currentState.outputBuses);
247 auto& bestLayouts = (isInput ? bestSupported.inputBuses : bestSupported.outputBuses);
248 auto& requestedLayouts = (isInput ? desiredLayout.inputBuses : desiredLayout.outputBuses);
249 auto& originalLayouts = (isInput ? originalState.inputBuses : originalState.outputBuses);
250
251 for (int busIndex = 0; busIndex < requestedLayouts.size(); ++busIndex)
252 {
253 auto& best = bestLayouts .getReference (busIndex);
254 auto& requested = requestedLayouts.getReference (busIndex);
255 auto& original = originalLayouts .getReference (busIndex);
256
257 // do we need to do anything
258 if (original == requested)
259 continue;
260
261 currentState = bestSupported;
262 auto& current = currentLayouts .getReference (busIndex);
263
264 // already supported?
265 current = requested;
266
267 if (checkBusesLayoutSupported (currentState))
268 {
269 bestSupported = currentState;
270 continue;
271 }
272
273 // try setting the opposite bus to the identical layout
274 const bool oppositeDirection = ! isInput;
275
276 if (getBusCount (oppositeDirection) > busIndex)
277 {
278 auto& oppositeLayout = (oppositeDirection ? currentState.inputBuses : currentState.outputBuses).getReference (busIndex);
279 oppositeLayout = requested;
280
281 if (checkBusesLayoutSupported (currentState))
282 {
283 bestSupported = currentState;
284 continue;
285 }
286
287 // try setting the default layout
288 oppositeLayout = getBus (oppositeDirection, busIndex)->getDefaultLayout();
289
290 if (checkBusesLayoutSupported (currentState))
291 {
292 bestSupported = currentState;
293 continue;
294 }
295 }
296
297 // try setting all other buses to the identical layout
298 BusesLayout allTheSame;
299 allTheSame.inputBuses.insertMultiple (-1, requested, getBusCount (true));
300 allTheSame.outputBuses.insertMultiple (-1, requested, getBusCount (false));
301
302 if (checkBusesLayoutSupported (allTheSame))
303 {
304 bestSupported = allTheSame;
305 continue;
306 }
307
308 // what is closer the default or the current layout?
309 auto distance = std::abs (best.size() - requested.size());
310 auto& defaultLayout = getBus (isInput, busIndex)->getDefaultLayout();
311
312 if (std::abs (defaultLayout.size() - requested.size()) < distance)
313 {
314 current = defaultLayout;
315
316 if (checkBusesLayoutSupported (currentState))
317 bestSupported = currentState;
318 }
319 }
320 }
321
322 actualLayouts = bestSupported;
323}
324
325//==============================================================================
327{
328 playHead = newPlayHead;
329}
330
332{
333 const ScopedLock sl (listenerLock);
334 listeners.addIfNotAlreadyThere (newListener);
335}
336
338{
339 const ScopedLock sl (listenerLock);
340 listeners.removeFirstMatchingValue (listenerToRemove);
341}
342
343void AudioProcessor::setPlayConfigDetails (int newNumIns, int newNumOuts, double newSampleRate, int newBlockSize)
344{
345 bool success = true;
346
347 if (getTotalNumInputChannels() != newNumIns)
348 success &= setChannelLayoutOfBus (true, 0, AudioChannelSet::canonicalChannelSet (newNumIns));
349
350 // failed to find a compatible input configuration
351 jassert (success);
352
353 if (getTotalNumOutputChannels() != newNumOuts)
354 success &= setChannelLayoutOfBus (false, 0, AudioChannelSet::canonicalChannelSet (newNumOuts));
355
356 // failed to find a compatible output configuration
357 jassert (success);
358
359 // if the user is using this method then they do not want any side-buses or aux outputs
360 success &= disableNonMainBuses();
361 jassert (success);
362
363 // the processor may not support this arrangement at all
364 jassert (success && newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels());
365
366 setRateAndBufferSizeDetails (newSampleRate, newBlockSize);
367 ignoreUnused (success);
368}
369
370void AudioProcessor::setRateAndBufferSizeDetails (double newSampleRate, int newBlockSize) noexcept
371{
372 currentSampleRate = newSampleRate;
373 blockSize = newBlockSize;
374}
375
376//==============================================================================
380
381int AudioProcessor::getChannelIndexInProcessBlockBuffer (bool isInput, int busIndex, int channelIndex) const noexcept
382{
383 auto& ioBus = isInput ? inputBuses : outputBuses;
384 jassert (isPositiveAndBelow (busIndex, ioBus.size()));
385
386 for (int i = 0; i < ioBus.size() && i < busIndex; ++i)
387 channelIndex += getChannelCountOfBus (isInput, i);
388
389 return channelIndex;
390}
391
392int AudioProcessor::getOffsetInBusBufferForAbsoluteChannelIndex (bool isInput, int absoluteChannelIndex, int& busIndex) const noexcept
393{
394 auto numBuses = getBusCount (isInput);
395 int numChannels = 0;
396
397 for (busIndex = 0; busIndex < numBuses && absoluteChannelIndex >= (numChannels = getChannelLayoutOfBus (isInput, busIndex).size()); ++busIndex)
398 absoluteChannelIndex -= numChannels;
399
400 return busIndex >= numBuses ? -1 : absoluteChannelIndex;
401}
402
403//==============================================================================
404void AudioProcessor::setNonRealtime (bool newNonRealtime) noexcept
405{
406 nonRealtime = newNonRealtime;
407}
408
410{
411 if (latencySamples != newLatency)
412 {
413 latencySamples = newLatency;
414 updateHostDisplay (AudioProcessorListener::ChangeDetails().withLatencyChanged (true));
415 }
416}
417
418//==============================================================================
420{
421 const ScopedLock sl (listenerLock);
422 return listeners[index];
423}
424
426{
427 for (int i = listeners.size(); --i >= 0;)
428 if (auto l = getListenerLocked (i))
429 l->audioProcessorChanged (this, details);
430}
431
433{
436
437 /* If you're building this plugin as an AudioUnit, and you intend to use the plugin in
438 Logic Pro or GarageBand, it's a good idea to set version hints on all of your parameters
439 so that you can add parameters safely in future versions of the plugin.
440 See the documentation for AudioProcessorParameter(int) for more information.
441 */
442 #if JucePlugin_Build_AU
444 #endif
445}
446
448{
449 ignoreUnused (param);
450
451 #if JUCE_DEBUG && ! JUCE_DISABLE_CAUTIOUS_PARAMETER_ID_CHECKING
452 if (auto* withID = dynamic_cast<AudioProcessorParameterWithID*> (param))
453 {
454 constexpr auto maximumSafeAAXParameterIdLength = 31;
455
456 const auto paramID = withID->paramID;
457
458 // If you hit this assertion, a parameter name is too long to be supported
459 // by the AAX plugin format.
460 // If there's a chance that you'll release this plugin in AAX format, you
461 // should consider reducing the length of this paramID.
462 // If you need to retain backwards-compatibility and are unable to change
463 // the paramID for this reason, you can add JUCE_DISABLE_CAUTIOUS_PARAMETER_ID_CHECKING
464 // to your preprocessor definitions to silence this assertion.
465 jassertquiet (paramID.length() <= maximumSafeAAXParameterIdLength);
466
467 // If you hit this assertion, two or more parameters have duplicate paramIDs
468 // after they have been truncated to support the AAX format.
469 // This is a serious issue, and will prevent the duplicated parameters from
470 // being automated when running as an AAX plugin.
471 // If there's a chance that you'll release this plugin in AAX format, you
472 // should reduce the length of this paramID.
473 // If you need to retain backwards-compatibility and are unable to change
474 // the paramID for this reason, you can add JUCE_DISABLE_CAUTIOUS_PARAMETER_ID_CHECKING
475 // to your preprocessor definitions to silence this assertion.
476 jassertquiet (trimmedParamIDs.insert (paramID.substring (0, maximumSafeAAXParameterIdLength)).second);
477 }
478 #endif
479}
480
482{
483 ignoreUnused (param);
484
485 #if JUCE_DEBUG
486 if (auto* withID = dynamic_cast<AudioProcessorParameterWithID*> (param))
487 {
488 auto insertResult = paramIDs.insert (withID->paramID);
489
490 // If you hit this assertion then the parameter ID is not unique
491 jassert (insertResult.second);
492 }
493 #endif
494}
495
497{
498 ignoreUnused (newGroup);
499
500 #if JUCE_DEBUG
501 auto groups = newGroup.getSubgroups (true);
502 groups.add (&newGroup);
503
504 for (auto* group : groups)
505 {
506 auto insertResult = groupIDs.insert (group->getID());
507
508 // If you hit this assertion then a group ID is not unique
509 jassert (insertResult.second);
510 }
511 #endif
512}
513
516
518{
519 jassert (param != nullptr);
520 parameterTree.addChild (std::unique_ptr<AudioProcessorParameter> (param));
521
522 param->processor = this;
523 param->parameterIndex = flatParameterList.size();
524 flatParameterList.add (param);
525
526 validateParameter (param);
527}
528
529void AudioProcessor::addParameterGroup (std::unique_ptr<AudioProcessorParameterGroup> group)
530{
531 jassert (group != nullptr);
533
534 auto oldSize = flatParameterList.size();
535 flatParameterList.addArray (group->getParameters (true));
536
537 for (int i = oldSize; i < flatParameterList.size(); ++i)
538 {
539 auto p = flatParameterList.getUnchecked (i);
540 p->processor = this;
541 p->parameterIndex = i;
542
544 }
545
546 parameterTree.addChild (std::move (group));
547}
548
550{
551 #if JUCE_DEBUG
552 paramIDs.clear();
553 groupIDs.clear();
554 #endif
555
556 parameterTree = std::move (newTree);
558
559 flatParameterList = parameterTree.getParameters (true);
560
561 for (int i = 0; i < flatParameterList.size(); ++i)
562 {
563 auto p = flatParameterList.getUnchecked (i);
564 p->processor = this;
565 p->parameterIndex = i;
566
568 }
569}
570
572
574{
575 return 0x7fffffff;
576}
577
578void AudioProcessor::suspendProcessing (const bool shouldBeSuspended)
579{
580 const ScopedLock sl (callbackLock);
581 suspended = shouldBeSuspended;
582}
583
585
586template <typename floatType>
588{
589 // If you hit this assertion then your plug-in is reporting that it introduces
590 // some latency, but you haven't overridden processBlockBypassed to produce
591 // an identical amount of latency. Without identical latency in
592 // processBlockBypassed a host's latency compensation could shift the audio
593 // passing through your bypassed plug-in forward in time.
594 jassert (getLatencySamples() == 0);
595
596 for (int ch = getMainBusNumInputChannels(); ch < getTotalNumOutputChannels(); ++ch)
597 buffer.clear (ch, 0, buffer.getNumSamples());
598}
599
602
604{
605 ignoreUnused (buffer, midiMessages);
606
607 // If you hit this assertion then either the caller called the double
608 // precision version of processBlock on a processor which does not support it
609 // (i.e. supportsDoublePrecisionProcessing() returns false), or the implementation
610 // of the AudioProcessor forgot to override the double precision version of this method
612}
613
615{
616 return false;
617}
618
620{
621 // If you hit this assertion then you're trying to use double precision
622 // processing on a processor which does not support it!
624
625 processingPrecision = precision;
626}
627
628//==============================================================================
630{
631 return buses.size() > 0 ? AudioChannelSet::getChannelTypeName (buses[0]->getCurrentLayout().getTypeOfChannel (index)) : String();
632}
633
634const String AudioProcessor::getInputChannelName (int index) const { return getChannelName (inputBuses, index); }
635const String AudioProcessor::getOutputChannelName (int index) const { return getChannelName (outputBuses, index); }
636
637static bool isStereoPair (const OwnedArray<AudioProcessor::Bus>& buses, int index)
638{
639 return index < 2
640 && buses.size() > 0
641 && buses[0]->getCurrentLayout() == AudioChannelSet::stereo();
642}
643
644bool AudioProcessor::isInputChannelStereoPair (int index) const { return isStereoPair (inputBuses, index); }
645bool AudioProcessor::isOutputChannelStereoPair (int index) const { return isStereoPair (outputBuses, index); }
646
647//==============================================================================
648void AudioProcessor::createBus (bool inputBus, const BusProperties& ioConfig)
649{
650 (inputBus ? inputBuses : outputBuses).add (new Bus (*this, ioConfig.busName, ioConfig.defaultLayout, ioConfig.isActivatedByDefault));
651
652 audioIOChanged (true, ioConfig.isActivatedByDefault);
653}
654
655//==============================================================================
657{
658 BusesProperties ioProps;
659
660 if (config[0].inChannels > 0)
661 ioProps.addBus (true, "Input", AudioChannelSet::canonicalChannelSet (config[0].inChannels));
662
663 if (config[0].outChannels > 0)
664 ioProps.addBus (false, "Output", AudioChannelSet::canonicalChannelSet (config[0].outChannels));
665
666 return ioProps;
667}
668
670 const Array<InOutChannelPair>& legacyLayouts) const
671{
672 auto numChannelConfigs = legacyLayouts.size();
673 jassert (numChannelConfigs > 0);
674
675 bool hasInputs = false, hasOutputs = false;
676
677 for (int i = 0; i < numChannelConfigs; ++i)
678 {
679 if (legacyLayouts[i].inChannels > 0)
680 {
681 hasInputs = true;
682 break;
683 }
684 }
685
686 for (int i = 0; i < numChannelConfigs; ++i)
687 {
688 if (legacyLayouts[i].outChannels > 0)
689 {
690 hasOutputs = true;
691 break;
692 }
693 }
694
695 auto nearest = layouts;
696 nearest.inputBuses .resize (hasInputs ? 1 : 0);
697 nearest.outputBuses.resize (hasOutputs ? 1 : 0);
698
699 auto* inBus = (hasInputs ? &nearest.inputBuses. getReference (0) : nullptr);
700 auto* outBus = (hasOutputs ? &nearest.outputBuses.getReference (0) : nullptr);
701
702 auto inNumChannelsRequested = static_cast<int16> (inBus != nullptr ? inBus->size() : 0);
703 auto outNumChannelsRequested = static_cast<int16> (outBus != nullptr ? outBus->size() : 0);
704
705 auto distance = std::numeric_limits<int32>::max();
706 int bestConfiguration = 0;
707
708 for (int i = 0; i < numChannelConfigs; ++i)
709 {
710 auto inChannels = legacyLayouts.getReference (i).inChannels;
711 auto outChannels = legacyLayouts.getReference (i).outChannels;
712
713 auto channelDifference = ((std::abs (inChannels - inNumChannelsRequested) & 0xffff) << 16)
714 | ((std::abs (outChannels - outNumChannelsRequested) & 0xffff) << 0);
715
716 if (channelDifference < distance)
717 {
718 distance = channelDifference;
719 bestConfiguration = i;
720
721 // we can exit if we found a perfect match
722 if (distance == 0)
723 return nearest;
724 }
725 }
726
727 auto inChannels = legacyLayouts.getReference (bestConfiguration).inChannels;
728 auto outChannels = legacyLayouts.getReference (bestConfiguration).outChannels;
729
730 auto currentState = getBusesLayout();
731 auto currentInLayout = (getBusCount (true) > 0 ? currentState.inputBuses .getReference(0) : AudioChannelSet());
732 auto currentOutLayout = (getBusCount (false) > 0 ? currentState.outputBuses.getReference(0) : AudioChannelSet());
733
734 if (inBus != nullptr)
735 {
736 if (inChannels == 0) *inBus = AudioChannelSet::disabled();
737 else if (inChannels == currentInLayout. size()) *inBus = currentInLayout;
738 else if (inChannels == currentOutLayout.size()) *inBus = currentOutLayout;
739 else *inBus = AudioChannelSet::canonicalChannelSet (inChannels);
740 }
741
742 if (outBus != nullptr)
743 {
744 if (outChannels == 0) *outBus = AudioChannelSet::disabled();
745 else if (outChannels == currentOutLayout.size()) *outBus = currentOutLayout;
746 else if (outChannels == currentInLayout .size()) *outBus = currentInLayout;
747 else *outBus = AudioChannelSet::canonicalChannelSet (outChannels);
748 }
749
750 return nearest;
751}
752
753bool AudioProcessor::containsLayout (const BusesLayout& layouts, const Array<InOutChannelPair>& channelLayouts)
754{
755 if (layouts.inputBuses.size() > 1 || layouts.outputBuses.size() > 1)
756 return false;
757
758 const InOutChannelPair mainLayout (static_cast<int16> (layouts.getNumChannels (true, 0)),
759 static_cast<int16> (layouts.getNumChannels (false, 0)));
760
761 return channelLayouts.contains (mainLayout);
762}
763
764//==============================================================================
766{
767 auto layouts = getBusesLayout();
768
769 for (int busIndex = 1; busIndex < layouts.inputBuses.size(); ++busIndex)
770 layouts.inputBuses.getReference (busIndex) = AudioChannelSet::disabled();
771
772 for (int busIndex = 1; busIndex < layouts.outputBuses.size(); ++busIndex)
773 layouts.outputBuses.getReference (busIndex) = AudioChannelSet::disabled();
774
775 return setBusesLayout (layouts);
776}
777
778// Unfortunately the deprecated getInputSpeakerArrangement/getOutputSpeakerArrangement return
779// references to strings. Therefore we need to keep a copy. Once getInputSpeakerArrangement is
780// removed, we can also remove this function
782{
785
786 if (getBusCount (true) > 0)
787 cachedInputSpeakerArrString = getBus (true, 0)->getCurrentLayout().getSpeakerArrangementAsString();
788
789 if (getBusCount (false) > 0)
790 cachedOutputSpeakerArrString = getBus (false, 0)->getCurrentLayout().getSpeakerArrangementAsString();
791}
792
794{
795 if (layouts == getBusesLayout())
796 return true;
797
798 auto numInputBuses = getBusCount (true);
799 auto numOutputBuses = getBusCount (false);
800
801 auto oldNumberOfIns = getTotalNumInputChannels();
802 auto oldNumberOfOuts = getTotalNumOutputChannels();
803
804 if (layouts.inputBuses. size() != numInputBuses
805 || layouts.outputBuses.size() != numOutputBuses)
806 return false;
807
808 int newNumberOfIns = 0, newNumberOfOuts = 0;
809
810 for (int busIndex = 0; busIndex < numInputBuses; ++busIndex)
811 {
812 auto& bus = *getBus (true, busIndex);
813 const auto& set = layouts.getChannelSet (true, busIndex);
814 bus.layout = set;
815
816 if (! set.isDisabled())
817 bus.lastLayout = set;
818
819 newNumberOfIns += set.size();
820 }
821
822 for (int busIndex = 0; busIndex < numOutputBuses; ++busIndex)
823 {
824 auto& bus = *getBus (false, busIndex);
825 const auto& set = layouts.getChannelSet (false, busIndex);
826 bus.layout = set;
827
828 if (! set.isDisabled())
829 bus.lastLayout = set;
830
831 newNumberOfOuts += set.size();
832 }
833
834 const bool channelNumChanged = (oldNumberOfIns != newNumberOfIns || oldNumberOfOuts != newNumberOfOuts);
835 audioIOChanged (false, channelNumChanged);
836
837 return true;
838}
839
840void AudioProcessor::audioIOChanged (bool busNumberChanged, bool channelNumChanged)
841{
842 auto numInputBuses = getBusCount (true);
843 auto numOutputBuses = getBusCount (false);
844
845 for (int dir = 0; dir < 2; ++dir)
846 {
847 const bool isInput = (dir == 0);
848 auto num = (isInput ? numInputBuses : numOutputBuses);
849
850 for (int i = 0; i < num; ++i)
851 if (auto* bus = getBus (isInput, i))
852 bus->updateChannelCount();
853 }
854
855 auto countTotalChannels = [] (const OwnedArray<AudioProcessor::Bus>& buses) noexcept
856 {
857 int n = 0;
858
859 for (auto* bus : buses)
860 n += bus->getNumberOfChannels();
861
862 return n;
863 };
864
865 cachedTotalIns = countTotalChannels (inputBuses);
866 cachedTotalOuts = countTotalChannels (outputBuses);
867
869
870 if (busNumberChanged)
872
873 if (channelNumChanged)
875
877}
878
879#if ! JUCE_AUDIOPROCESSOR_NO_GUI
880//==============================================================================
882{
883 const ScopedLock sl (activeEditorLock);
884
885 if (activeEditor == editor)
886 activeEditor = nullptr;
887}
888
894
896{
897 const ScopedLock sl (activeEditorLock);
898
899 if (activeEditor != nullptr)
900 return activeEditor;
901
902 auto* ed = createEditor();
903
904 if (ed != nullptr)
905 {
906 // you must give your editor comp a size before returning it..
907 jassert (ed->getWidth() > 0 && ed->getHeight() > 0);
908 activeEditor = ed;
909 }
910
911 // You must make your hasEditor() method return a consistent result!
912 jassert (hasEditor() == (ed != nullptr));
913
914 return ed;
915}
916#endif
917
918//==============================================================================
920{
921 getStateInformation (destData);
922}
923
925{
926 setStateInformation (data, sizeInBytes);
927}
928
929//==============================================================================
931
932//==============================================================================
933// magic number to identify memory blocks that we've stored as XML
934const uint32 magicXmlNumber = 0x21324356;
935
936void AudioProcessor::copyXmlToBinary (const XmlElement& xml, juce::MemoryBlock& destData)
937{
938 {
939 MemoryOutputStream out (destData, false);
940 out.writeInt (magicXmlNumber);
941 out.writeInt (0);
942 xml.writeTo (out, XmlElement::TextFormat().singleLine());
943 out.writeByte (0);
944 }
945
946 // go back and write the string length..
947 static_cast<uint32*> (destData.getData())[1]
948 = ByteOrder::swapIfBigEndian ((uint32) destData.getSize() - 9);
949}
950
951std::unique_ptr<XmlElement> AudioProcessor::getXmlFromBinary (const void* data, const int sizeInBytes)
952{
953 if (sizeInBytes > 8 && ByteOrder::littleEndianInt (data) == magicXmlNumber)
954 {
955 auto stringLength = (int) ByteOrder::littleEndianInt (addBytesToPointer (data, 4));
956
957 if (stringLength > 0)
958 return parseXML (String::fromUTF8 (static_cast<const char*> (data) + 8,
959 jmin ((sizeInBytes - 8), stringLength)));
960 }
961
962 return {};
963}
964
965bool AudioProcessor::canApplyBusCountChange (bool isInput, bool isAdding,
966 AudioProcessor::BusProperties& outProperties)
967{
968 if ( isAdding && ! canAddBus (isInput)) return false;
969 if (! isAdding && ! canRemoveBus (isInput)) return false;
970
971 auto num = getBusCount (isInput);
972
973 // No way for me to find out the default layout if there are no other busses!!
974 if (num == 0)
975 return false;
976
977 if (isAdding)
978 {
979 outProperties.busName = String (isInput ? "Input #" : "Output #") + String (getBusCount (isInput));
980 outProperties.defaultLayout = (num > 0 ? getBus (isInput, num - 1)->getDefaultLayout() : AudioChannelSet());
981 outProperties.isActivatedByDefault = true;
982 }
983
984 return true;
985}
986
987//==============================================================================
989 const AudioChannelSet& defaultLayout, bool isDfltEnabled)
990 : owner (processor), name (busName),
991 layout (isDfltEnabled ? defaultLayout : AudioChannelSet()),
992 dfltLayout (defaultLayout), lastLayout (defaultLayout),
993 enabledByDefault (isDfltEnabled)
994{
995 // Your default layout cannot be disabled
996 jassert (! dfltLayout.isDisabled());
997}
998
999bool AudioProcessor::Bus::isInput() const noexcept { return owner.inputBuses.contains (this); }
1001
1003{
1005 di.index = owner.inputBuses.indexOf (this);
1006 di.isInput = (di.index >= 0);
1007
1008 if (! di.isInput)
1009 di.index = owner.outputBuses.indexOf (this);
1010
1011 return di;
1012}
1013
1015{
1016 auto di = getDirectionAndIndex();
1017 return owner.setChannelLayoutOfBus (di.isInput, di.index, busLayout);
1018}
1019
1021{
1022 if (! set.isDisabled())
1023 {
1024 if (isEnabled())
1025 return setCurrentLayout (set);
1026
1027 if (isLayoutSupported (set))
1028 {
1029 lastLayout = set;
1030 return true;
1031 }
1032
1033 return false;
1034 }
1035
1036 return isLayoutSupported (set);
1037}
1038
1040{
1041 auto di = getDirectionAndIndex();
1042
1043 if (owner.setChannelLayoutOfBus (di.isInput, di.index, AudioChannelSet::canonicalChannelSet (channels)))
1044 return true;
1045
1046 if (channels == 0)
1047 return false;
1048
1049 auto namedSet = AudioChannelSet::namedChannelSet (channels);
1050
1051 if (! namedSet.isDisabled() && owner.setChannelLayoutOfBus (di.isInput, di.index, namedSet))
1052 return true;
1053
1054 return owner.setChannelLayoutOfBus (di.isInput, di.index, AudioChannelSet::discreteChannels (channels));
1055}
1056
1057bool AudioProcessor::Bus::enable (bool shouldEnable)
1058{
1059 if (isEnabled() == shouldEnable)
1060 return true;
1061
1062 return setCurrentLayout (shouldEnable ? lastLayout : AudioChannelSet::disabled());
1063}
1064
1066{
1067 for (int ch = limit; ch > 0; --ch)
1069 return ch;
1070
1071 return (isMain() && isLayoutSupported (AudioChannelSet::disabled())) ? 0 : -1;
1072}
1073
1075{
1076 auto di = getDirectionAndIndex();
1077
1078 // check that supplied ioLayout is actually valid
1079 if (ioLayout != nullptr)
1080 {
1081 if (! owner.checkBusesLayoutSupported (*ioLayout))
1082 {
1083 *ioLayout = owner.getBusesLayout();
1084
1085 // the current layout you supplied is not a valid layout
1087 }
1088 }
1089
1090 auto currentLayout = (ioLayout != nullptr ? *ioLayout : owner.getBusesLayout());
1091 auto& actualBuses = (di.isInput ? currentLayout.inputBuses : currentLayout.outputBuses);
1092
1093 if (actualBuses.getReference (di.index) == set)
1094 return true;
1095
1096 auto desiredLayout = currentLayout;
1097
1098 (di.isInput ? desiredLayout.inputBuses
1099 : desiredLayout.outputBuses).getReference (di.index) = set;
1100
1101 owner.getNextBestLayout (desiredLayout, currentLayout);
1102
1103 if (ioLayout != nullptr)
1104 *ioLayout = currentLayout;
1105
1106 // Nearest layout has a different number of buses. JUCE plug-ins MUST
1107 // have fixed number of buses.
1108 jassert (currentLayout.inputBuses. size() == owner.getBusCount (true)
1109 && currentLayout.outputBuses.size() == owner.getBusCount (false));
1110
1111 return actualBuses.getReference (di.index) == set;
1112}
1113
1115{
1116 if (channels == 0)
1118
1119 auto set = supportedLayoutWithChannels (channels);
1120 return (! set.isDisabled()) && isLayoutSupported (set);
1121}
1122
1124{
1125 if (channels == 0)
1127
1128 {
1129 AudioChannelSet set;
1130
1131 if (! (set = AudioChannelSet::namedChannelSet (channels)).isDisabled() && isLayoutSupported (set))
1132 return set;
1133
1134 if (! (set = AudioChannelSet::discreteChannels (channels)).isDisabled() && isLayoutSupported (set))
1135 return set;
1136 }
1137
1138 for (auto& set : AudioChannelSet::channelSetsWithNumberOfChannels (channels))
1139 if (isLayoutSupported (set))
1140 return set;
1141
1143}
1144
1146{
1147 auto layouts = owner.getBusesLayout();
1148 isLayoutSupported (set, &layouts);
1149 return layouts;
1150}
1151
1153{
1154 auto di = getDirectionAndIndex();
1155 return owner.getChannelIndexInProcessBlockBuffer (di.isInput, di.index, channelIndex);
1156}
1157
1162
1163//==============================================================================
1165 const AudioChannelSet& dfltLayout, bool isActivatedByDefault)
1166{
1167 jassert (dfltLayout.size() != 0);
1168
1169 BusProperties props;
1170
1171 props.busName = name;
1172 props.defaultLayout = dfltLayout;
1173 props.isActivatedByDefault = isActivatedByDefault;
1174
1175 (isInput ? inputLayouts : outputLayouts).add (props);
1176}
1177
1179 const AudioChannelSet& dfltLayout,
1180 bool isActivatedByDefault) const
1181{
1182 auto retval = *this;
1183 retval.addBus (true, name, dfltLayout, isActivatedByDefault);
1184 return retval;
1185}
1186
1188 const AudioChannelSet& dfltLayout,
1189 bool isActivatedByDefault) const
1190{
1191 auto retval = *this;
1192 retval.addBus (false, name, dfltLayout, isActivatedByDefault);
1193 return retval;
1194}
1195
1196//==============================================================================
1198 const AudioChannelSet& mainOutputLayout,
1199 const bool idForAudioSuite) const
1200{
1201 int uniqueFormatId = 0;
1202
1203 for (int dir = 0; dir < 2; ++dir)
1204 {
1205 const bool isInput = (dir == 0);
1206 auto& set = (isInput ? mainInputLayout : mainOutputLayout);
1207 int aaxFormatIndex = 0;
1208
1209 const AudioChannelSet sets[]
1210 {
1230 };
1231
1232 const auto index = (int) std::distance (std::begin (sets), std::find (std::begin (sets), std::end (sets), set));
1233
1234 if (index != numElementsInArray (sets))
1235 aaxFormatIndex = index;
1236 else
1238
1239 uniqueFormatId = (uniqueFormatId << 8) | aaxFormatIndex;
1240 }
1241
1242 return (idForAudioSuite ? 0x6a796161 /* 'jyaa' */ : 0x6a636161 /* 'jcaa' */) + uniqueFormatId;
1243}
1244
1245//==============================================================================
1247{
1248 switch (type)
1249 {
1250 case AudioProcessor::wrapperType_Undefined: return "Undefined";
1251 case AudioProcessor::wrapperType_VST: return "VST";
1252 case AudioProcessor::wrapperType_VST3: return "VST3";
1253 case AudioProcessor::wrapperType_AudioUnit: return "AU";
1254 case AudioProcessor::wrapperType_AudioUnitv3: return "AUv3";
1255 case AudioProcessor::wrapperType_AAX: return "AAX";
1256 case AudioProcessor::wrapperType_Standalone: return "Standalone";
1257 case AudioProcessor::wrapperType_Unity: return "Unity";
1258 case AudioProcessor::wrapperType_LV2: return "LV2";
1259 default: jassertfalse; return {};
1260 }
1261}
1262
1263//==============================================================================
1264JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
1266
1267void AudioProcessor::setParameterNotifyingHost (int parameterIndex, float newValue)
1268{
1269 if (auto* param = getParameters()[parameterIndex])
1270 {
1271 param->setValueNotifyingHost (newValue);
1272 }
1273 else if (isPositiveAndBelow (parameterIndex, getNumParameters()))
1274 {
1275 setParameter (parameterIndex, newValue);
1276 sendParamChangeMessageToListeners (parameterIndex, newValue);
1277 }
1278}
1279
1280void AudioProcessor::sendParamChangeMessageToListeners (int parameterIndex, float newValue)
1281{
1282 if (auto* param = getParameters()[parameterIndex])
1283 {
1284 param->sendValueChangedMessageToListeners (newValue);
1285 }
1286 else
1287 {
1288 if (isPositiveAndBelow (parameterIndex, getNumParameters()))
1289 {
1290 for (int i = listeners.size(); --i >= 0;)
1291 if (auto* l = getListenerLocked (i))
1292 l->audioProcessorParameterChanged (this, parameterIndex, newValue);
1293 }
1294 else
1295 {
1296 jassertfalse; // called with an out-of-range parameter index!
1297 }
1298 }
1299}
1300
1302{
1303 if (auto* param = getParameters()[parameterIndex])
1304 {
1305 param->beginChangeGesture();
1306 }
1307 else
1308 {
1309 if (isPositiveAndBelow (parameterIndex, getNumParameters()))
1310 {
1311 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
1312 // This means you've called beginParameterChangeGesture twice in succession without a matching
1313 // call to endParameterChangeGesture. That might be fine in most hosts, but better to avoid doing it.
1314 jassert (! changingParams[parameterIndex]);
1315 changingParams.setBit (parameterIndex);
1316 #endif
1317
1318 for (int i = listeners.size(); --i >= 0;)
1319 if (auto* l = getListenerLocked (i))
1320 l->audioProcessorParameterChangeGestureBegin (this, parameterIndex);
1321 }
1322 else
1323 {
1324 jassertfalse; // called with an out-of-range parameter index!
1325 }
1326 }
1327}
1328
1330{
1331 if (auto* param = getParameters()[parameterIndex])
1332 {
1333 param->endChangeGesture();
1334 }
1335 else
1336 {
1337 if (isPositiveAndBelow (parameterIndex, getNumParameters()))
1338 {
1339 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
1340 // This means you've called endParameterChangeGesture without having previously called
1341 // beginParameterChangeGesture. That might be fine in most hosts, but better to keep the
1342 // calls matched correctly.
1343 jassert (changingParams[parameterIndex]);
1344 changingParams.clearBit (parameterIndex);
1345 #endif
1346
1347 for (int i = listeners.size(); --i >= 0;)
1348 if (auto* l = getListenerLocked (i))
1349 l->audioProcessorParameterChangeGestureEnd (this, parameterIndex);
1350 }
1351 else
1352 {
1353 jassertfalse; // called with an out-of-range parameter index!
1354 }
1355 }
1356}
1357
1358String AudioProcessor::getParameterName (int index, int maximumStringLength)
1359{
1360 if (auto* p = getParameters()[index])
1361 return p->getName (maximumStringLength);
1362
1363 return isPositiveAndBelow (index, getNumParameters()) ? getParameterName (index).substring (0, maximumStringLength)
1364 : String();
1365}
1366
1368{
1369 #if JUCE_DEBUG
1370 // if you hit this, then you're probably using the old parameter control methods,
1371 // but have forgotten to implement either of the getParameterText() methods.
1372 jassert (! textRecursionCheck);
1373 ScopedValueSetter<bool> sv (textRecursionCheck, true, false);
1374 #endif
1375
1376 return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index, 1024)
1377 : String();
1378}
1379
1380String AudioProcessor::getParameterText (int index, int maximumStringLength)
1381{
1382 if (auto* p = getParameters()[index])
1383 return p->getText (p->getValue(), maximumStringLength);
1384
1385 return isPositiveAndBelow (index, getNumParameters()) ? getParameterText (index).substring (0, maximumStringLength)
1386 : String();
1387}
1388
1390{
1391 return getParameters().size();
1392}
1393
1395{
1396 if (auto* p = getParamChecked (index))
1397 return p->getValue();
1398
1399 return 0;
1400}
1401
1402void AudioProcessor::setParameter (int index, float newValue)
1403{
1404 if (auto* p = getParamChecked (index))
1405 p->setValue (newValue);
1406}
1407
1409{
1410 if (auto* p = getParameters()[index])
1411 return p->getDefaultValue();
1412
1413 return 0;
1414}
1415
1417{
1418 if (auto* p = getParamChecked (index))
1419 return p->getName (512);
1420
1421 return {};
1422}
1423
1425{
1426 // Don't use getParamChecked here, as this must also work for legacy plug-ins
1427 if (auto* p = dynamic_cast<AudioProcessorParameterWithID*> (getParameters()[index]))
1428 return p->paramID;
1429
1430 return String (index);
1431}
1432
1434{
1435 if (auto* p = getParameters()[index])
1436 return p->getNumSteps();
1437
1439}
1440
1442{
1443 if (auto* p = getParameters()[index])
1444 return p->isDiscrete();
1445
1446 return false;
1447}
1448
1450{
1451 if (auto* p = getParameters()[index])
1452 return p->getLabel();
1453
1454 return {};
1455}
1456
1458{
1459 if (auto* p = getParameters()[index])
1460 return p->isAutomatable();
1461
1462 return true;
1463}
1464
1466{
1467 if (auto* p = getParameters()[index])
1468 return p->isOrientationInverted();
1469
1470 return false;
1471}
1472
1474{
1475 if (auto* p = getParameters()[index])
1476 return p->isMetaParameter();
1477
1478 return false;
1479}
1480
1482{
1483 if (auto* p = getParameters()[index])
1484 return p->getCategory();
1485
1487}
1488
1490{
1491 auto p = getParameters()[index];
1492
1493 // If you hit this, then you're either trying to access parameters that are out-of-range,
1494 // or you're not using addParameter and the managed parameter list, but have failed
1495 // to override some essential virtual methods and implement them appropriately.
1496 jassert (p != nullptr);
1497 return p;
1498}
1499
1502
1503//==============================================================================
1506
1507//==============================================================================
1509{
1510 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
1511 // This will fail if you've called beginChangeGesture() without having made
1512 // a corresponding call to endChangeGesture...
1513 jassert (! isPerformingGesture);
1514 #endif
1515}
1516
1518{
1519 setValue (newValue);
1521}
1522
1524{
1525 // This method can't be used until the parameter has been attached to a processor!
1526 jassert (processor != nullptr && parameterIndex >= 0);
1527
1528 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
1529 // This means you've called beginChangeGesture twice in succession without
1530 // a matching call to endChangeGesture. That might be fine in most hosts,
1531 // but it would be better to avoid doing it.
1532 jassert (! isPerformingGesture);
1533 isPerformingGesture = true;
1534 #endif
1535
1536 ScopedLock lock (listenerLock);
1537
1538 for (int i = listeners.size(); --i >= 0;)
1539 if (auto* l = listeners[i])
1540 l->parameterGestureChanged (getParameterIndex(), true);
1541
1542 if (processor != nullptr && parameterIndex >= 0)
1543 {
1544 // audioProcessorParameterChangeGestureBegin callbacks will shortly be deprecated and
1545 // this code will be removed.
1546 for (int i = processor->listeners.size(); --i >= 0;)
1547 if (auto* l = processor->listeners[i])
1548 l->audioProcessorParameterChangeGestureBegin (processor, getParameterIndex());
1549 }
1550}
1551
1553{
1554 // This method can't be used until the parameter has been attached to a processor!
1555 jassert (processor != nullptr && parameterIndex >= 0);
1556
1557 #if JUCE_DEBUG && ! JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING
1558 // This means you've called endChangeGesture without having previously
1559 // called beginChangeGesture. That might be fine in most hosts, but it
1560 // would be better to keep the calls matched correctly.
1561 jassert (isPerformingGesture);
1562 isPerformingGesture = false;
1563 #endif
1564
1565 ScopedLock lock (listenerLock);
1566
1567 for (int i = listeners.size(); --i >= 0;)
1568 if (auto* l = listeners[i])
1569 l->parameterGestureChanged (getParameterIndex(), false);
1570
1571 if (processor != nullptr && parameterIndex >= 0)
1572 {
1573 // audioProcessorParameterChangeGestureEnd callbacks will shortly be deprecated and
1574 // this code will be removed.
1575 for (int i = processor->listeners.size(); --i >= 0;)
1576 if (auto* l = processor->listeners[i])
1577 l->audioProcessorParameterChangeGestureEnd (processor, getParameterIndex());
1578 }
1579}
1580
1582{
1583 ScopedLock lock (listenerLock);
1584
1585 for (int i = listeners.size(); --i >= 0;)
1586 if (auto* l = listeners [i])
1587 l->parameterValueChanged (getParameterIndex(), newValue);
1588
1589 if (processor != nullptr && parameterIndex >= 0)
1590 {
1591 // audioProcessorParameterChanged callbacks will shortly be deprecated and
1592 // this code will be removed.
1593 for (int i = processor->listeners.size(); --i >= 0;)
1594 if (auto* l = processor->listeners[i])
1595 l->audioProcessorParameterChanged (processor, getParameterIndex(), newValue);
1596 }
1597}
1598
1600bool AudioProcessorParameter::isAutomatable() const { return true; }
1601bool AudioProcessorParameter::isMetaParameter() const { return false; }
1604bool AudioProcessorParameter::isDiscrete() const { return false; }
1605bool AudioProcessorParameter::isBoolean() const { return false; }
1606
1607String AudioProcessorParameter::getText (float value, int /*maximumStringLength*/) const
1608{
1609 return String (value, 2);
1610}
1611
1616
1618{
1619 if (isDiscrete() && valueStrings.isEmpty())
1620 {
1621 auto maxIndex = getNumSteps() - 1;
1622
1623 for (int i = 0; i < getNumSteps(); ++i)
1624 valueStrings.add (getText ((float) i / (float) maxIndex, 1024));
1625 }
1626
1627 return valueStrings;
1628}
1629
1631{
1632 const ScopedLock sl (listenerLock);
1633 listeners.addIfNotAlreadyThere (newListener);
1634}
1635
1637{
1638 const ScopedLock sl (listenerLock);
1639 listeners.removeFirstMatchingValue (listenerToRemove);
1640}
1641
1642} // namespace juce
#define copy(x)
Definition ADnoteParameters.cpp:1011
#define noexcept
Definition DistrhoDefines.h:72
T limit(T val, T min, T max)
Definition Util.h:78
CAdPlugDatabase::CRecord::RecordType type
Definition adplugdb.cpp:93
virtual void setNonRealtime(bool isNonRealtime) noexcept
Definition AudioProcessor.cpp:72
virtual const String getOutputChannelName(ChannelType, uint) const
Definition AudioProcessor.cpp:127
virtual ~AudioProcessor()
Definition AudioProcessor.cpp:42
void setPlayConfigDetails(uint numAudioIns, uint numAudioOuts, uint numCVIns, uint numCVOuts, uint numMIDIIns, uint numMIDIOuts, double sampleRate, int blockSize)
Definition AudioProcessor.cpp:47
AudioProcessor()
Definition AudioProcessor.cpp:25
void setLatencySamples(int newLatency)
Definition AudioProcessor.cpp:77
virtual void reset()
Definition AudioProcessor.cpp:89
void setRateAndBufferSizeDetails(double sampleRate, int blockSize) noexcept
Definition AudioProcessor.cpp:65
void suspendProcessing(bool shouldBeSuspended)
Definition AudioProcessor.cpp:83
virtual const String getInputChannelName(ChannelType, uint) const
Definition AudioProcessor.cpp:122
static uint16 swapIfBigEndian(uint16 value) noexcept
Definition ByteOrder.h:218
Definition juce_Array.h:56
int size() const noexcept
Definition juce_Array.h:215
bool contains(ParameterType elementToLookFor) const
Definition juce_Array.h:400
ElementType & getReference(int index) noexcept
Definition juce_Array.h:267
Definition juce_AudioSampleBuffer.h:34
Definition juce_AudioChannelSet.h:47
static AudioChannelSet JUCE_CALLTYPE create7point1()
Definition juce_AudioChannelSet.cpp:464
static AudioChannelSet JUCE_CALLTYPE namedChannelSet(int numChannels)
Definition juce_AudioChannelSet.cpp:525
static AudioChannelSet JUCE_CALLTYPE quadraphonic()
Definition juce_AudioChannelSet.cpp:466
static AudioChannelSet JUCE_CALLTYPE create5point0()
Definition juce_AudioChannelSet.cpp:456
int size() const noexcept
Definition juce_AudioChannelSet.cpp:396
static AudioChannelSet JUCE_CALLTYPE create6point0()
Definition juce_AudioChannelSet.cpp:458
static AudioChannelSet JUCE_CALLTYPE disabled()
Definition juce_AudioChannelSet.cpp:450
bool isDisabled() const noexcept
Definition juce_AudioChannelSet.h:451
static AudioChannelSet JUCE_CALLTYPE mono()
Definition juce_AudioChannelSet.cpp:451
static Array< AudioChannelSet > JUCE_CALLTYPE channelSetsWithNumberOfChannels(int numChannels)
Definition juce_AudioChannelSet.cpp:539
static AudioChannelSet JUCE_CALLTYPE stereo()
Definition juce_AudioChannelSet.cpp:452
static AudioChannelSet JUCE_CALLTYPE create6point1()
Definition juce_AudioChannelSet.cpp:459
static AudioChannelSet JUCE_CALLTYPE create5point1()
Definition juce_AudioChannelSet.cpp:457
static AudioChannelSet JUCE_CALLTYPE create7point0SDDS()
Definition juce_AudioChannelSet.cpp:463
static String JUCE_CALLTYPE getChannelTypeName(ChannelType)
Definition juce_AudioChannelSet.cpp:42
static AudioChannelSet JUCE_CALLTYPE create7point0point2()
Definition juce_AudioChannelSet.cpp:472
static AudioChannelSet JUCE_CALLTYPE create7point1SDDS()
Definition juce_AudioChannelSet.cpp:465
static AudioChannelSet JUCE_CALLTYPE create7point0()
Definition juce_AudioChannelSet.cpp:462
static AudioChannelSet JUCE_CALLTYPE ambisonic(int order=1)
Definition juce_AudioChannelSet.cpp:479
static AudioChannelSet JUCE_CALLTYPE createLCRS()
Definition juce_AudioChannelSet.cpp:455
static AudioChannelSet JUCE_CALLTYPE create7point1point2()
Definition juce_AudioChannelSet.cpp:473
static AudioChannelSet JUCE_CALLTYPE canonicalChannelSet(int numChannels)
Definition juce_AudioChannelSet.cpp:511
static AudioChannelSet JUCE_CALLTYPE discreteChannels(int numChannels)
Definition juce_AudioChannelSet.cpp:504
static AudioChannelSet JUCE_CALLTYPE createLCR()
Definition juce_AudioChannelSet.cpp:453
Definition juce_AudioPlayHead.h:39
Definition juce_AudioProcessor.h:361
AudioChannelSet supportedLayoutWithChannels(int channels) const
Definition juce_AudioProcessor.cpp:1123
AudioChannelSet lastLayout
Definition juce_AudioProcessor.h:495
bool enable(bool shouldEnable=true)
Definition juce_AudioProcessor.cpp:1057
bool isNumberOfChannelsSupported(int channels) const
Definition juce_AudioProcessor.cpp:1114
AudioProcessor & owner
Definition juce_AudioProcessor.h:493
bool setCurrentLayoutWithoutEnabling(const AudioChannelSet &layout)
Definition juce_AudioProcessor.cpp:1020
friend class AudioProcessor
Definition juce_AudioProcessor.h:481
BusDirectionAndIndex getDirectionAndIndex() const noexcept
Definition juce_AudioProcessor.cpp:1002
String name
Definition juce_AudioProcessor.h:494
bool setCurrentLayout(const AudioChannelSet &layout)
Definition juce_AudioProcessor.cpp:1014
int getBusIndex() const noexcept
Definition juce_AudioProcessor.cpp:1000
void updateChannelCount() noexcept
Definition juce_AudioProcessor.cpp:1158
AudioChannelSet dfltLayout
Definition juce_AudioProcessor.h:495
int getChannelIndexInProcessBlockBuffer(int channelIndex) const noexcept
Definition juce_AudioProcessor.cpp:1152
bool setNumberOfChannels(int channels)
Definition juce_AudioProcessor.cpp:1039
int getMaxSupportedChannels(int limit=AudioChannelSet::maxChannelsOfNamedLayout) const
Definition juce_AudioProcessor.cpp:1065
bool isLayoutSupported(const AudioChannelSet &set, BusesLayout *currentLayout=nullptr) const
Definition juce_AudioProcessor.cpp:1074
bool isMain() const noexcept
Definition juce_AudioProcessor.h:370
AudioChannelSet layout
Definition juce_AudioProcessor.h:495
bool isEnabled() const noexcept
Definition juce_AudioProcessor.h:452
bool isInput() const noexcept
Definition juce_AudioProcessor.cpp:999
BusesLayout getBusesLayoutForLayoutChangeOfBus(const AudioChannelSet &set) const
Definition juce_AudioProcessor.cpp:1145
Bus(AudioProcessor &, const String &, const AudioChannelSet &, bool)
Definition juce_AudioProcessor.cpp:988
bool enabledByDefault
Definition juce_AudioProcessor.h:496
int cachedChannelCount
Definition juce_AudioProcessor.h:497
Definition juce_AudioProcessorEditor.h:43
Definition juce_AudioProcessor.h:46
virtual bool canApplyBusesLayout(const BusesLayout &layouts) const
Definition juce_AudioProcessor.h:1336
Array< AudioProcessorListener * > listeners
Definition juce_AudioProcessor.h:1498
friend class AudioProcessorParameter
Definition juce_AudioProcessor.h:1545
int getTotalNumInputChannels() const noexcept
Definition juce_AudioProcessor.h:733
virtual AudioProcessorParameter::Category getParameterCategory(int parameterIndex) const
Definition juce_AudioProcessor.cpp:1481
void processBypassed(AudioBuffer< floatType > &, MidiBuffer &)
Definition juce_AudioProcessor.cpp:587
int getChannelIndexInProcessBlockBuffer(bool isInput, int busIndex, int channelIndex) const noexcept
Definition juce_AudioProcessor.cpp:381
bool suspended
Definition juce_AudioProcessor.h:1504
virtual const String getParameterName(int parameterIndex)
Definition juce_AudioProcessor.cpp:1416
void audioIOChanged(bool busNumberChanged, bool channelNumChanged)
Definition juce_AudioProcessor.cpp:840
bool enableAllBuses()
Definition juce_AudioProcessor.cpp:205
WrapperType
Definition juce_AudioProcessor.h:1222
@ wrapperType_Standalone
Definition juce_AudioProcessor.h:1229
@ wrapperType_VST
Definition juce_AudioProcessor.h:1224
@ wrapperType_AAX
Definition juce_AudioProcessor.h:1228
@ wrapperType_Undefined
Definition juce_AudioProcessor.h:1223
@ wrapperType_AudioUnitv3
Definition juce_AudioProcessor.h:1227
@ wrapperType_Unity
Definition juce_AudioProcessor.h:1230
@ wrapperType_LV2
Definition juce_AudioProcessor.h:1231
@ wrapperType_AudioUnit
Definition juce_AudioProcessor.h:1226
@ wrapperType_VST3
Definition juce_AudioProcessor.h:1225
void setProcessingPrecision(ProcessingPrecision newPrecision) noexcept
Definition juce_AudioProcessor.cpp:619
virtual void processBlockBypassed(AudioBuffer< float > &buffer, MidiBuffer &midiMessages)
Definition juce_AudioProcessor.cpp:600
OwnedArray< Bus > inputBuses
Definition juce_AudioProcessor.h:1510
Bus * getBus(bool isInput, int busIndex) noexcept
Definition juce_AudioProcessor.h:509
Component::SafePointer< AudioProcessorEditor > activeEditor
Definition juce_AudioProcessor.h:1500
const WrapperType wrapperType
Definition juce_AudioProcessor.h:1237
void updateHostDisplay(const ChangeDetails &details=ChangeDetails::getDefaultFlags())
Definition juce_AudioProcessor.cpp:425
int getLatencySamples() const noexcept
Definition juce_AudioProcessor.h:824
int cachedTotalIns
Definition juce_AudioProcessor.h:1513
virtual float getParameterDefaultValue(int parameterIndex)
Definition juce_AudioProcessor.cpp:1408
void setParameterTree(AudioProcessorParameterGroup &&newTree)
Definition juce_AudioProcessor.cpp:549
virtual bool isOutputChannelStereoPair(int index) const
Definition juce_AudioProcessor.cpp:645
virtual String getParameterLabel(int index) const
Definition juce_AudioProcessor.cpp:1449
BusesLayout getBusesLayout() const
Definition juce_AudioProcessor.cpp:171
bool disableNonMainBuses()
Definition juce_AudioProcessor.cpp:765
bool checkBusesLayoutSupported(const BusesLayout &) const
Definition juce_AudioProcessor.cpp:215
void addParameter(AudioProcessorParameter *)
Definition juce_AudioProcessor.cpp:517
virtual bool supportsDoublePrecisionProcessing() const
Definition juce_AudioProcessor.cpp:614
virtual bool applyBusLayouts(const BusesLayout &layouts)
Definition juce_AudioProcessor.cpp:793
virtual float getParameter(int parameterIndex)
Definition juce_AudioProcessor.cpp:1394
Array< AudioProcessorParameter * > flatParameterList
Definition juce_AudioProcessor.h:1516
OwnedArray< Bus > outputBuses
Definition juce_AudioProcessor.h:1510
void updateSpeakerFormatStrings()
Definition juce_AudioProcessor.cpp:781
virtual bool isParameterDiscrete(int parameterIndex) const
Definition juce_AudioProcessor.cpp:1441
virtual bool isParameterAutomatable(int parameterIndex) const
Definition juce_AudioProcessor.cpp:1457
virtual int getParameterNumSteps(int parameterIndex)
Definition juce_AudioProcessor.cpp:1433
virtual bool isParameterOrientationInverted(int index) const
Definition juce_AudioProcessor.cpp:1465
virtual void removeListener(AudioProcessorListener *listenerToRemove)
Definition juce_AudioProcessor.cpp:337
void endParameterChangeGesture(int parameterIndex)
Definition juce_AudioProcessor.cpp:1329
BusesLayout getNextBestLayoutInList(const BusesLayout &, const Array< InOutChannelPair > &) const
Definition juce_AudioProcessor.cpp:669
virtual void updateTrackProperties(const TrackProperties &properties)
Definition juce_AudioProcessor.cpp:930
bool removeBus(bool isInput)
Definition juce_AudioProcessor.cpp:87
std::atomic< bool > nonRealtime
Definition juce_AudioProcessor.h:1505
int getBusCount(bool isInput) const noexcept
Definition juce_AudioProcessor.h:504
virtual void getStateInformation(juce::MemoryBlock &destData)=0
ProcessingPrecision
Definition juce_AudioProcessor.h:76
@ doublePrecision
Definition juce_AudioProcessor.h:78
static std::unique_ptr< XmlElement > getXmlFromBinary(const void *data, int sizeInBytes)
Definition juce_AudioProcessor.cpp:951
static BusesProperties busesPropertiesFromLayoutArray(const Array< InOutChannelPair > &)
Definition juce_AudioProcessor.cpp:656
void sendParamChangeMessageToListeners(int parameterIndex, float newValue)
Definition juce_AudioProcessor.cpp:1280
virtual bool isInputChannelStereoPair(int index) const
Definition juce_AudioProcessor.cpp:644
int getOffsetInBusBufferForAbsoluteChannelIndex(bool isInput, int absoluteChannelIndex, int &busIndex) const noexcept
Definition juce_AudioProcessor.cpp:392
virtual void setPlayHead(AudioPlayHead *newPlayHead)
Definition juce_AudioProcessor.cpp:326
virtual AudioProcessorEditor * createEditor()=0
static void JUCE_CALLTYPE setTypeOfNextNewPlugin(WrapperType)
Definition juce_AudioProcessor.cpp:31
virtual void numBusesChanged()
Definition juce_AudioProcessor.cpp:378
virtual void processBlock(AudioBuffer< float > &buffer, MidiBuffer &midiMessages)=0
AudioProcessorEditor * getActiveEditor() const noexcept
Definition juce_AudioProcessor.cpp:889
int cachedTotalOuts
Definition juce_AudioProcessor.h:1513
void validateParameter(AudioProcessorParameter *)
Definition juce_AudioProcessor.cpp:432
virtual bool isMetaParameter(int parameterIndex) const
Definition juce_AudioProcessor.cpp:1473
void checkForDuplicateGroupIDs(const AudioProcessorParameterGroup &)
Definition juce_AudioProcessor.cpp:496
virtual const String getName() const =0
int latencySamples
Definition juce_AudioProcessor.h:1503
double currentSampleRate
Definition juce_AudioProcessor.h:1502
AudioProcessorEditor * createEditorIfNeeded()
Definition juce_AudioProcessor.cpp:895
virtual bool canAddBus(bool isInput) const
Definition juce_AudioProcessor.h:527
bool addBus(bool isInput)
Definition juce_AudioProcessor.cpp:73
void editorBeingDeleted(AudioProcessorEditor *) noexcept
Definition juce_AudioProcessor.cpp:881
const AudioProcessorParameterGroup & getParameterTree() const
Definition juce_AudioProcessor.cpp:515
virtual void addListener(AudioProcessorListener *newListener)
Definition juce_AudioProcessor.cpp:331
std::atomic< AudioPlayHead * > playHead
Definition juce_AudioProcessor.h:1403
CriticalSection activeEditorLock
Definition juce_AudioProcessor.h:1507
int getChannelCountOfBus(bool isInput, int busIndex) const noexcept
Definition juce_AudioProcessor.h:616
const Array< AudioProcessorParameter * > & getParameters() const
Definition juce_AudioProcessor.cpp:514
virtual bool hasEditor() const =0
static bool containsLayout(const BusesLayout &layouts, const std::initializer_list< const short[2]> &channelLayoutList)
Definition juce_AudioProcessor.h:768
virtual String getParameterID(int index)
Definition juce_AudioProcessor.cpp:1424
virtual void processorLayoutsChanged()
Definition juce_AudioProcessor.cpp:379
static void copyXmlToBinary(const XmlElement &xml, juce::MemoryBlock &destData)
Definition juce_AudioProcessor.cpp:936
virtual void setStateInformation(const void *data, int sizeInBytes)=0
static int getDefaultNumParameterSteps() noexcept
Definition juce_AudioProcessor.cpp:573
CriticalSection callbackLock
Definition juce_AudioProcessor.h:1507
void addParameterGroup(std::unique_ptr< AudioProcessorParameterGroup >)
Definition juce_AudioProcessor.cpp:529
CriticalSection listenerLock
Definition juce_AudioProcessor.h:1507
void checkForDuplicateParamID(AudioProcessorParameter *)
Definition juce_AudioProcessor.cpp:481
virtual bool isBusesLayoutSupported(const BusesLayout &) const
Definition juce_AudioProcessor.h:1303
virtual bool canRemoveBus(bool isInput) const
Definition juce_AudioProcessor.h:540
AudioChannelSet getChannelLayoutOfBus(bool isInput, int busIndex) const noexcept
Definition juce_AudioProcessor.cpp:181
void createBus(bool isInput, const BusProperties &)
Definition juce_AudioProcessor.cpp:648
virtual void setParameter(int parameterIndex, float newValue)
Definition juce_AudioProcessor.cpp:1402
virtual void numChannelsChanged()
Definition juce_AudioProcessor.cpp:377
virtual void refreshParameterList()
Definition juce_AudioProcessor.cpp:571
bool setChannelLayoutOfBus(bool isInput, int busIndex, const AudioChannelSet &layout)
Definition juce_AudioProcessor.cpp:189
virtual StringArray getAlternateDisplayNames() const
Definition juce_AudioProcessor.cpp:70
virtual const String getParameterText(int parameterIndex)
Definition juce_AudioProcessor.cpp:1367
bool setBusesLayoutWithoutEnabling(const BusesLayout &)
Definition juce_AudioProcessor.cpp:127
int getTotalNumOutputChannels() const noexcept
Definition juce_AudioProcessor.h:747
void checkForDuplicateTrimmedParamID(AudioProcessorParameter *)
Definition juce_AudioProcessor.cpp:447
virtual bool canApplyBusCountChange(bool isInput, bool isAddingBuses, BusProperties &outNewBusProperties)
Definition juce_AudioProcessor.cpp:965
AudioProcessorListener * getListenerLocked(int) const noexcept
Definition juce_AudioProcessor.cpp:419
AudioProcessorParameter * getParamChecked(int) const
Definition juce_AudioProcessor.cpp:1489
virtual int32 getAAXPluginIDForMainBusConfig(const AudioChannelSet &mainInputLayout, const AudioChannelSet &mainOutputLayout, bool idForAudioSuite) const
Definition juce_AudioProcessor.cpp:1197
virtual int getNumParameters()
Definition juce_AudioProcessor.cpp:1389
static const char * getWrapperTypeDescription(AudioProcessor::WrapperType) noexcept
Definition juce_AudioProcessor.cpp:1246
void getNextBestLayout(const BusesLayout &, BusesLayout &) const
Definition juce_AudioProcessor.cpp:224
ProcessingPrecision processingPrecision
Definition juce_AudioProcessor.h:1506
bool setBusesLayout(const BusesLayout &)
Definition juce_AudioProcessor.cpp:111
int getMainBusNumInputChannels() const noexcept
Definition juce_AudioProcessor.h:750
void setParameterNotifyingHost(int parameterIndex, float newValue)
Definition juce_AudioProcessor.cpp:1267
String cachedInputSpeakerArrString
Definition juce_AudioProcessor.h:1512
virtual void setCurrentProgramStateInformation(const void *data, int sizeInBytes)
Definition juce_AudioProcessor.cpp:924
void beginParameterChangeGesture(int parameterIndex)
Definition juce_AudioProcessor.cpp:1301
void setRateAndBufferSizeDetails(double sampleRate, int blockSize) noexcept
Definition juce_AudioProcessor.cpp:370
AudioProcessorParameterGroup parameterTree
Definition juce_AudioProcessor.h:1515
String cachedOutputSpeakerArrString
Definition juce_AudioProcessor.h:1512
int blockSize
Definition juce_AudioProcessor.h:1503
AudioProcessor()
Definition juce_AudioProcessor.cpp:36
virtual void getCurrentProgramStateInformation(juce::MemoryBlock &destData)
Definition juce_AudioProcessor.cpp:919
Definition juce_AudioProcessorListener.h:40
virtual void audioProcessorParameterChangeGestureBegin(AudioProcessor *processor, int parameterIndex)
Definition juce_AudioProcessor.cpp:1504
virtual void audioProcessorParameterChangeGestureEnd(AudioProcessor *processor, int parameterIndex)
Definition juce_AudioProcessor.cpp:1505
Definition juce_AudioProcessorParameter.h:294
Definition juce_AudioProcessorParameterGroup.h:42
Array< const AudioProcessorParameterGroup * > getSubgroups(bool recursive) const
Definition juce_AudioProcessorParameterGroup.cpp:114
virtual float getValue() const =0
StringArray valueStrings
Definition juce_AudioProcessorParameter.h:352
void sendValueChangedMessageToListeners(float newValue)
Definition juce_AudioProcessor.cpp:1581
virtual String getCurrentValueAsText() const
Definition juce_AudioProcessor.cpp:1612
virtual String getText(float normalisedValue, int) const
Definition juce_AudioProcessor.cpp:1607
virtual int getNumSteps() const
Definition juce_AudioProcessor.cpp:1603
virtual bool isMetaParameter() const
Definition juce_AudioProcessor.cpp:1601
int parameterIndex
Definition juce_AudioProcessorParameter.h:348
virtual void setValue(float newValue)=0
virtual bool isAutomatable() const
Definition juce_AudioProcessor.cpp:1600
virtual ~AudioProcessorParameter()
Definition juce_AudioProcessor.cpp:1508
void beginChangeGesture()
Definition juce_AudioProcessor.cpp:1523
void removeListener(Listener *listener)
Definition juce_AudioProcessor.cpp:1636
Array< Listener * > listeners
Definition juce_AudioProcessorParameter.h:351
virtual StringArray getAllValueStrings() const
Definition juce_AudioProcessor.cpp:1617
Category
Definition juce_AudioProcessorParameter.h:231
@ genericParameter
Definition juce_AudioProcessorParameter.h:232
void setValueNotifyingHost(float newValue)
Definition juce_AudioProcessor.cpp:1517
void endChangeGesture()
Definition juce_AudioProcessor.cpp:1552
CriticalSection listenerLock
Definition juce_AudioProcessorParameter.h:350
virtual bool isDiscrete() const
Definition juce_AudioProcessor.cpp:1604
virtual bool isOrientationInverted() const
Definition juce_AudioProcessor.cpp:1599
void addListener(Listener *newListener)
Definition juce_AudioProcessor.cpp:1630
AudioProcessor * processor
Definition juce_AudioProcessorParameter.h:347
int getParameterIndex() const noexcept
Definition juce_AudioProcessorParameter.h:254
virtual bool isBoolean() const
Definition juce_AudioProcessor.cpp:1605
virtual Category getCategory() const
Definition juce_AudioProcessor.cpp:1602
int getVersionHint() const
Definition juce_AudioProcessorParameter.h:280
Definition juce_AudioProcessorParameterWithID.h:118
static constexpr uint32 littleEndianInt(const void *bytes) noexcept
Definition juce_ByteOrder.h:203
void * getData() noexcept
Definition juce_MemoryBlock.h:91
size_t getSize() const noexcept
Definition juce_MemoryBlock.h:127
Definition juce_MemoryOutputStream.h:36
Definition juce_MidiBuffer.h:145
Definition juce_OwnedArray.h:51
int size() const noexcept
Definition juce_OwnedArray.h:130
Definition juce_ScopedValueSetter.h:55
Definition juce_StringArray.h:35
Definition juce_String.h:53
static String fromUTF8(const char *utf8buffer, int bufferSizeBytes=-1)
Definition juce_String.cpp:2125
Definition juce_ThreadLocalValue.h:48
Definition juce_XmlElement.h:83
void writeTo(OutputStream &output, const TextFormat &format={}) const
Definition juce_XmlElement.cpp:359
int * l
Definition inflate.c:1579
register unsigned i
Definition inflate.c:1575
int retval
Definition inflate.c:947
struct config_s config
static PuglViewHint int value
Definition pugl.h:1708
static const char * name
Definition pugl.h:1582
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 JUCE_BEGIN_IGNORE_WARNINGS_MSVC(warnings)
Definition juce_CompilerWarnings.h:198
#define JUCE_END_IGNORE_WARNINGS_MSVC
Definition juce_CompilerWarnings.h:199
#define jassert(expression)
#define jassertquiet(expression)
#define jassertfalse
#define JUCE_CALLTYPE
float out
Definition lilv_test.c:1461
Definition carla_juce.cpp:31
CriticalSection::ScopedLockType ScopedLock
Definition juce_CriticalSection.h:186
static ThreadLocalValue< AudioProcessor::WrapperType > wrapperTypeBeingCreated
Definition juce_AudioProcessor.cpp:29
constexpr Type jmin(Type a, Type b)
Definition juce_MathsFunctions.h:106
unsigned int uint32
Definition juce_MathsFunctions.h:45
signed short int16
Definition juce_MathsFunctions.h:39
const uint32 magicXmlNumber
Definition juce_AudioProcessor.cpp:934
static bool isStereoPair(const OwnedArray< AudioProcessor::Bus > &buses, int index)
Definition juce_AudioProcessor.cpp:637
std::unique_ptr< XmlElement > parseXML(const String &textToParse)
Definition juce_XmlDocument.cpp:41
void ignoreUnused(Types &&...) noexcept
Definition juce_MathsFunctions.h:333
static String getChannelName(const OwnedArray< AudioProcessor::Bus > &buses, int index)
Definition juce_AudioProcessor.cpp:629
Type * addBytesToPointer(Type *basePointer, IntegerType bytes) noexcept
Definition juce_Memory.h:111
signed int int32
Definition juce_MathsFunctions.h:43
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Definition juce_MathsFunctions.h:279
@ group
Definition juce_AccessibilityRole.h:61
constexpr int numElementsInArray(Type(&)[N]) noexcept
Definition juce_MathsFunctions.h:344
#define false
Definition ordinals.h:83
Definition juce_AudioProcessor.h:485
bool isInput
Definition juce_AudioProcessor.h:486
int index
Definition juce_AudioProcessor.h:487
Definition juce_AudioProcessor.h:1348
AudioChannelSet defaultLayout
Definition juce_AudioProcessor.h:1353
bool isActivatedByDefault
Definition juce_AudioProcessor.h:1356
String busName
Definition juce_AudioProcessor.h:1350
Definition juce_AudioProcessor.h:311
Array< AudioChannelSet > outputBuses
Definition juce_AudioProcessor.h:316
int getNumChannels(bool isInput, int busIndex) const noexcept
Definition juce_AudioProcessor.h:319
Array< AudioChannelSet > inputBuses
Definition juce_AudioProcessor.h:313
AudioChannelSet & getChannelSet(bool isInput, int busIndex) noexcept
Definition juce_AudioProcessor.h:326
Definition juce_AudioProcessor.h:1361
Array< BusProperties > outputLayouts
Definition juce_AudioProcessor.h:1366
void addBus(bool isInput, const String &name, const AudioChannelSet &defaultLayout, bool isActivatedByDefault=true)
Definition juce_AudioProcessor.cpp:1164
Array< BusProperties > inputLayouts
Definition juce_AudioProcessor.h:1363
JUCE_NODISCARD BusesProperties withOutput(const String &name, const AudioChannelSet &defaultLayout, bool isActivatedByDefault=true) const
Definition juce_AudioProcessor.cpp:1187
JUCE_NODISCARD BusesProperties withInput(const String &name, const AudioChannelSet &defaultLayout, bool isActivatedByDefault=true) const
Definition juce_AudioProcessor.cpp:1178
Definition juce_AudioProcessor.h:1447
Definition juce_AudioProcessor.h:1246
Definition juce_AudioProcessorListener.h:63
Definition juce_XmlElement.h:136
int n
Definition crypt.c:458
uch * p
Definition crypt.c:594
ulg size
Definition extract.c:2350
zoff_t request
Definition extract.c:1037
typedef int(UZ_EXP MsgFn)()
#define const
Definition zconf.h:137