JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
juce::AudioProcessor::Bus Class Reference

Describes the layout and properties of an audio bus. More...

#include "juce_AudioProcessor.h"

Public Member Functions

bool isInput () const noexcept
 Returns true if this bus is an input bus.
 
int getBusIndex () const noexcept
 Returns the index of this bus.
 
bool isMain () const noexcept
 Returns true if the current bus is the main input or output bus.
 
const StringgetName () const noexcept
 The bus's name.
 
const AudioChannelSetgetDefaultLayout () const noexcept
 Get the default layout of this bus.
 
const AudioChannelSetgetCurrentLayout () const noexcept
 The bus's current layout.
 
const AudioChannelSetgetLastEnabledLayout () const noexcept
 Return the bus's last active channel layout.
 
bool setCurrentLayout (const AudioChannelSet &layout)
 Sets the bus's current layout.
 
bool setCurrentLayoutWithoutEnabling (const AudioChannelSet &layout)
 Sets the bus's current layout without changing the enabled state.
 
int getNumberOfChannels () const noexcept
 Return the number of channels of the current bus.
 
bool setNumberOfChannels (int channels)
 Set the number of channels of this bus.
 
bool isLayoutSupported (const AudioChannelSet &set, BusesLayout *currentLayout=nullptr) const
 Checks if a particular layout is supported.
 
bool isNumberOfChannelsSupported (int channels) const
 Checks if this bus can support a given number of channels.
 
AudioChannelSet supportedLayoutWithChannels (int channels) const
 Returns a ChannelSet that the bus supports with a given number of channels.
 
int getMaxSupportedChannels (int limit=AudioChannelSet::maxChannelsOfNamedLayout) const
 Returns the maximum number of channels that this bus can support.
 
BusesLayout getBusesLayoutForLayoutChangeOfBus (const AudioChannelSet &set) const
 Returns the resulting layouts of all buses after changing the layout of this bus.
 
bool isEnabled () const noexcept
 Returns true if the current bus is enabled.
 
bool enable (bool shouldEnable=true)
 Enable or disable this bus.
 
bool isEnabledByDefault () const noexcept
 Returns if this bus is enabled by default.
 
int getChannelIndexInProcessBlockBuffer (int channelIndex) const noexcept
 Returns the position of a bus's channels within the processBlock buffer.
 
template<typename FloatType >
AudioBuffer< FloatType > getBusBuffer (AudioBuffer< FloatType > &processBlockBuffer) const
 Returns an AudioBuffer containing a set of channel pointers for a specific bus.
 

Friends

class AudioProcessor
 

Detailed Description

Describes the layout and properties of an audio bus.

Effectively a bus description is a named set of channel types.

See also
AudioChannelSet, AudioProcessor::addBus

Definition at line 370 of file juce_AudioProcessor.h.

Member Function Documentation

◆ enable()

bool juce::AudioProcessor::Bus::enable ( bool  shouldEnable = true)

Enable or disable this bus.

This will return false if the AudioProcessor does not support disabling this bus.

Definition at line 1050 of file juce_AudioProcessor.cpp.

◆ getBusBuffer()

template<typename FloatType >
AudioBuffer< FloatType > juce::AudioProcessor::Bus::getBusBuffer ( AudioBuffer< FloatType > &  processBlockBuffer) const

Returns an AudioBuffer containing a set of channel pointers for a specific bus.

This can be called in processBlock to get a buffer containing a sub-group of the master AudioBuffer which contains all the plugin channels.

Definition at line 484 of file juce_AudioProcessor.h.

◆ getBusesLayoutForLayoutChangeOfBus()

AudioProcessor::BusesLayout juce::AudioProcessor::Bus::getBusesLayoutForLayoutChangeOfBus ( const AudioChannelSet set) const

Returns the resulting layouts of all buses after changing the layout of this bus.

Changing an individual layout of a bus may also change the layout of all the other buses. This method returns what the layouts of all the buses of the audio processor would be, if you were to change the layout of this bus to the given layout. If there is no way to support the given layout then this method will return the next best layout.

Definition at line 1138 of file juce_AudioProcessor.cpp.

◆ getBusIndex()

int juce::AudioProcessor::Bus::getBusIndex ( ) const
noexcept

Returns the index of this bus.

Definition at line 993 of file juce_AudioProcessor.cpp.

◆ getChannelIndexInProcessBlockBuffer()

int juce::AudioProcessor::Bus::getChannelIndexInProcessBlockBuffer ( int  channelIndex) const
noexcept

Returns the position of a bus's channels within the processBlock buffer.

This can be called in processBlock to figure out which channel of the master AudioBuffer maps onto a specific bus's channel.

Definition at line 1145 of file juce_AudioProcessor.cpp.

◆ getCurrentLayout()

const AudioChannelSet & juce::AudioProcessor::Bus::getCurrentLayout ( ) const
noexcept

The bus's current layout.

This will be AudioChannelSet::disabled() if the current layout is disabled.

See also
AudioChannelSet

Definition at line 396 of file juce_AudioProcessor.h.

◆ getDefaultLayout()

const AudioChannelSet & juce::AudioProcessor::Bus::getDefaultLayout ( ) const
noexcept

Get the default layout of this bus.

See also
AudioChannelSet

Definition at line 389 of file juce_AudioProcessor.h.

◆ getLastEnabledLayout()

const AudioChannelSet & juce::AudioProcessor::Bus::getLastEnabledLayout ( ) const
noexcept

Return the bus's last active channel layout.

If the bus is currently enabled then the result will be identical to getCurrentLayout otherwise it will return the last enabled layout.

See also
AudioChannelSet

Definition at line 403 of file juce_AudioProcessor.h.

◆ getMaxSupportedChannels()

int juce::AudioProcessor::Bus::getMaxSupportedChannels ( int  limit = AudioChannelSet::maxChannelsOfNamedLayout) const

Returns the maximum number of channels that this bus can support.

Parameters
limitThe maximum value to return.

Definition at line 1058 of file juce_AudioProcessor.cpp.

◆ getName()

const String & juce::AudioProcessor::Bus::getName ( ) const
noexcept

The bus's name.

Definition at line 384 of file juce_AudioProcessor.h.

◆ getNumberOfChannels()

int juce::AudioProcessor::Bus::getNumberOfChannels ( ) const
noexcept

Return the number of channels of the current bus.

Definition at line 418 of file juce_AudioProcessor.h.

◆ isEnabled()

bool juce::AudioProcessor::Bus::isEnabled ( ) const
noexcept

Returns true if the current bus is enabled.

Definition at line 462 of file juce_AudioProcessor.h.

◆ isEnabledByDefault()

bool juce::AudioProcessor::Bus::isEnabledByDefault ( ) const
noexcept

Returns if this bus is enabled by default.

Definition at line 469 of file juce_AudioProcessor.h.

◆ isInput()

bool juce::AudioProcessor::Bus::isInput ( ) const
noexcept

Returns true if this bus is an input bus.

Definition at line 992 of file juce_AudioProcessor.cpp.

◆ isLayoutSupported()

bool juce::AudioProcessor::Bus::isLayoutSupported ( const AudioChannelSet set,
BusesLayout currentLayout = nullptr 
) const

Checks if a particular layout is supported.

Parameters
setThe AudioChannelSet which is to be probed.
currentLayoutIf non-null, pretend that the current layout of the AudioProcessor is currentLayout. On exit, currentLayout will be modified to represent the buses layouts of the AudioProcessor as if the layout of the receiver had been successfully changed. This is useful as changing the layout of the receiver may change the bus layout of other buses.
See also
AudioChannelSet

Definition at line 1067 of file juce_AudioProcessor.cpp.

◆ isMain()

bool juce::AudioProcessor::Bus::isMain ( ) const
noexcept

Returns true if the current bus is the main input or output bus.

Definition at line 380 of file juce_AudioProcessor.h.

◆ isNumberOfChannelsSupported()

bool juce::AudioProcessor::Bus::isNumberOfChannelsSupported ( int  channels) const

Checks if this bus can support a given number of channels.

Definition at line 1107 of file juce_AudioProcessor.cpp.

◆ setCurrentLayout()

bool juce::AudioProcessor::Bus::setCurrentLayout ( const AudioChannelSet layout)

Sets the bus's current layout.

If the AudioProcessor does not support this layout then this will return false.

See also
AudioChannelSet

Definition at line 1007 of file juce_AudioProcessor.cpp.

◆ setCurrentLayoutWithoutEnabling()

bool juce::AudioProcessor::Bus::setCurrentLayoutWithoutEnabling ( const AudioChannelSet layout)

Sets the bus's current layout without changing the enabled state.

If the AudioProcessor does not support this layout then this will return false.

See also
AudioChannelSet

Definition at line 1013 of file juce_AudioProcessor.cpp.

◆ setNumberOfChannels()

bool juce::AudioProcessor::Bus::setNumberOfChannels ( int  channels)

Set the number of channels of this bus.

This will return false if the AudioProcessor does not support this layout.

Definition at line 1032 of file juce_AudioProcessor.cpp.

◆ supportedLayoutWithChannels()

AudioChannelSet juce::AudioProcessor::Bus::supportedLayoutWithChannels ( int  channels) const

Returns a ChannelSet that the bus supports with a given number of channels.

Definition at line 1116 of file juce_AudioProcessor.cpp.

Friends And Related Symbol Documentation

◆ AudioProcessor

friend class AudioProcessor
friend

Definition at line 491 of file juce_AudioProcessor.h.


The documentation for this class was generated from the following files: