|
| | ChannelConfiguration ()=default |
| | Creates an empty channel configuration.
|
| |
| | ChannelConfiguration (std::vector< ChannelIndex > channels) |
| | Creates a channel configuration from a list of channel indices.
|
| |
| | ChannelConfiguration (const ChannelIndex *channels, size_t numChannels) |
| | Creates a channel configuration from a span of channel indices.
|
| |
| bool | isEmpty () const noexcept |
| | Returns true if this configuration has no channels.
|
| |
| size_t | size () const noexcept |
| | Returns the number of channels in this configuration.
|
| |
| int | getNumChannels () const noexcept |
| | Returns the number of channels in this configuration.
|
| |
| const ChannelIndex * | data () const noexcept |
| | Returns a pointer to the channel data.
|
| |
| const ChannelIndex & | operator[] (size_t index) const |
| | Returns the channel at the given index.
|
| |
| auto | begin () noexcept |
| | Returns an iterator to the beginning.
|
| |
| auto | begin () const noexcept |
| |
| auto | end () noexcept |
| | Returns an iterator to the end.
|
| |
| auto | end () const noexcept |
| |
| bool | isMono () const noexcept |
| | Returns true if this is a mono configuration (single channel).
|
| |
| bool | isStereo () const noexcept |
| | Returns true if this is a stereo configuration (exactly 2 channels, L+R).
|
| |
| bool | isMonoOrStereo () const noexcept |
| | Returns true if this configuration has 1 or 2 channels.
|
| |
| bool | isMultichannel () const noexcept |
| | Returns true if this configuration has more than 2 channels.
|
| |
| bool | contains (const ChannelIndex &) const noexcept |
| | Returns true if this configuration contains the given channel (exact match).
|
| |
| bool | containsDeviceChannel (int deviceChannelIndex) const noexcept |
| | Returns true if this configuration contains a channel with the given device index.
|
| |
| std::pair< int, int > | getChannelRange () const |
| | Returns the range of device channel indices [first, one-past-last) used by this configuration.
|
| |
| ChannelConfiguration | intersection (const ChannelConfiguration &other) const |
| | Returns a new configuration containing only channels whose device indices also appear in the other configuration.
|
| |
| juce::AudioChannelSet | toChannelSet () const |
| | Creates a JUCE AudioChannelSet from this configuration.
|
| |
| void | clear () noexcept |
| | Clears all channels from this configuration.
|
| |
| void | addChannel (ChannelIndex channel) |
| | Adds a channel to this configuration.
|
| |
| void | setNumChannels (int numChannels, int firstDeviceChannelIndex=0) |
| | Sets the number of channels, creating discrete channels starting from a given index.
|
| |
| bool | operator== (const ChannelConfiguration &other) const |
| |
| bool | operator!= (const ChannelConfiguration &other) const |
| |
| choc::value::Value | toJSON () const |
| | Serializes this configuration to JSON.
|
| |
| std::string | toString () const |
| | Serializes this configuration to a string.
|
| |
| ChannelConfiguration | reversed () const |
| | Returns a new configuration with the device index mapping reversed.
|
| |
| juce::String | getDescription () const |
| | Creates a human-readable description of the channels.
|
| |
| juce::String | getMatchingPresetName () const |
| | Returns the preset name that matches this configuration, or "From Edit" if no match.
|
| |
|
| static ChannelConfiguration | none () |
| | Creates an empty configuration — a bus that imposes no channel-count requirement.
|
| |
| static ChannelConfiguration | mono (int deviceChannelIndex=0) |
| | Creates a mono configuration with a single channel.
|
| |
| static ChannelConfiguration | left (int deviceChannelIndex=0) |
| | Creates a left-only configuration (single left channel).
|
| |
| static ChannelConfiguration | right (int deviceChannelIndex=1) |
| | Creates a right-only configuration (single right channel).
|
| |
| static ChannelConfiguration | stereo (int firstDeviceChannelIndex=0) |
| | Creates a stereo configuration with left and right channels.
|
| |
| static ChannelConfiguration | surround5_1 (int firstDeviceChannelIndex=0) |
| | Creates a 5.1 surround configuration (L, R, C, LFE, Ls, Rs).
|
| |
| static ChannelConfiguration | surround7_1 (int firstDeviceChannelIndex=0) |
| | Creates a 7.1 surround configuration (L, R, C, LFE, Ls, Rs, Lrs, Rrs).
|
| |
| static ChannelConfiguration | discreteChannels (int numChannels, int firstDeviceChannelIndex=0) |
| | Creates a configuration with discrete (unnamed) channels.
|
| |
| static ChannelConfiguration | canonical (int numChannels, int firstDeviceChannelIndex=0) |
| | Creates a canonical configuration for a given number of channels.
|
| |
| static ChannelConfiguration | fromChannelSet (const juce::AudioChannelSet &, int firstDeviceChannelIndex=0) |
| | Creates a configuration from an AudioChannelSet and starting device index.
|
| |
| static ChannelConfiguration | fromJSON (const choc::value::ValueView &) |
| | Creates a configuration from JSON.
|
| |
| static ChannelConfiguration | fromString (std::string_view) |
| | Creates a configuration from a string.
|
| |
Represents a configuration of audio channels.
This is a wrapper around a list of ChannelIndex objects, optimized to avoid heap allocations for typical channel counts (up to 8 channels).
Use the factory methods to create common configurations:
static ChannelConfiguration stereo(int firstDeviceChannelIndex=0)
Creates a stereo configuration with left and right channels.
static ChannelConfiguration mono(int deviceChannelIndex=0)
Creates a mono configuration with a single channel.
static ChannelConfiguration discreteChannels(int numChannels, int firstDeviceChannelIndex=0)
Creates a configuration with discrete (unnamed) channels.
static ChannelConfiguration surround5_1(int firstDeviceChannelIndex=0)
Creates a 5.1 surround configuration (L, R, C, LFE, Ls, Rs).
Returns a new configuration with the device index mapping reversed.
Channel types are preserved in their original positions, but the indexInDevice values are reversed. For example, stereo [{idx:0,L}, {idx:1,R}] becomes [{idx:1,L}, {idx:0,R}].