pub struct BusLayout {
pub main_in: Option<ChannelConfig>,
pub main_out: ChannelConfig,
pub sidechain_in: Option<ChannelConfig>,
pub aux_out: Option<ChannelConfig>,
}Expand description
One complete I/O layout (main in/out + optional sidechain in + optional aux out).
Instruments can use Self::output_only. Effects use Self::mono /
Self::stereo / Self::stereo_and_mono. Add buses via
Self::with_sidechain / Self::with_aux.
Fields§
§main_in: Option<ChannelConfig>Main input width. None = no audio input (generator / instrument).
main_out: ChannelConfigMain output width.
sidechain_in: Option<ChannelConfig>Optional sidechain input bus. None = no sidechain.
aux_out: Option<ChannelConfig>Optional aux output bus. None = no aux out.
Implementations§
Source§impl BusLayout
impl BusLayout
pub const fn mono() -> BusLayout
pub const fn stereo() -> BusLayout
Sourcepub const fn output_only(out: ChannelConfig) -> BusLayout
pub const fn output_only(out: ChannelConfig) -> BusLayout
Output-only layout (instrument / generator).
Sourcepub const fn with_sidechain(self, sidechain: ChannelConfig) -> BusLayout
pub const fn with_sidechain(self, sidechain: ChannelConfig) -> BusLayout
Return a copy of this layout with the given sidechain input bus.
Sourcepub const fn with_aux(self, aux: ChannelConfig) -> BusLayout
pub const fn with_aux(self, aux: ChannelConfig) -> BusLayout
Return a copy of this layout with the given aux output bus.
Sourcepub fn stereo_and_mono() -> Vec<BusLayout>
pub fn stereo_and_mono() -> Vec<BusLayout>
Default effect set: stereo first (host default), then mono.
pub const fn main_input_channels(self) -> u32
pub const fn sidechain_input_channels(self) -> u32
pub const fn aux_output_channels(self) -> u32
Sourcepub const fn input_port_count(self) -> u32
pub const fn input_port_count(self) -> u32
CLAP/VST3 input port count (main + optional sidechain), not channels.
Stereo sidechain is still one port with two channels. Using
Self::sidechain_input_channels here advertises extra ports with
duplicate ids and breaks host routing (Bitwig dry-passthrough).
Sourcepub const fn output_port_count(self) -> u32
pub const fn output_port_count(self) -> u32
CLAP/VST3 output port count (main + optional aux), not channels.
Sourcepub const fn total_input_channels(self) -> u32
pub const fn total_input_channels(self) -> u32
Total audio input channels passed to AudioBuffer:
main inputs followed by sidechain inputs.
pub const fn main_output_channels(self) -> u32
Sourcepub const fn total_output_channels(self) -> u32
pub const fn total_output_channels(self) -> u32
Total audio output channels: main outputs followed by aux outputs.
Sourcepub fn config_name(self) -> String
pub fn config_name(self) -> String
Human-readable config name for host menus (clap.audio-ports-config).