Skip to content

Audio Buses

Narta Xaymar Dirks edited this page Nov 27, 2026 · 1 revision

Audio buses

A bus is a group of channels with its own volume and pause state. Every channel plays on the master bus, 0, until it is put on another one, and every bus feeds another bus, up to the master bus:

master (0)
├── world
│   └── cave
└── music

A channel is as loud as its own volume, times the volume of its bus, times the volume of every bus that bus feeds. Pausing a bus pauses the channels of the buses that feed it too, and stopping one stops them.

world = CreateAudioBus()
cave  = CreateAudioBus(world)
music = CreateAudioBus()
MusicBus music

SoundBus dripping, cave
EmitSound dripping, stalactite

; The pause menu: the world fades out and stops, the music plays on, quieter.
AudioBusVolume world, 0, 300
AudioBusVolume music, 0.5, 300
PauseAudioBus world
Command What it does
CreateAudioBus, FreeAudioBus Make and free a bus.
AudioBusParent, GetAudioBusParent The bus that a bus feeds.
AudioBusVolume, GetAudioBusVolume Its volume, set at once or over a fade time.
PauseAudioBus, ResumeAudioBus, StopAudioBus All its channels at once.
ChannelBus, GetChannelBus The bus of one channel.
SoundBus, MusicBus The bus that channels of a sound, or of PlayMusic, start on.

A program that uses none of these sounds exactly as before: nothing is added to the mix until a bus command is used.

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally