Skip to content

AddAudioEffect

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

AddAudioEffect BlitzLLVM

AddAudioEffect:Int32 bus:Int32, type:Int32, position:Int32=-1
Parameter Mode Type Default Description
bus In Int32 required A bus from CreateAudioBus, or 0 for the master bus. Anything else is a runtime error.
type In Int32 required BB_EFFECT_LOWPASS to BB_EFFECT_LOFI (1 to 12) from the shipped include file audio.bb. 0, which a BB_ name is when audio.bb is not included, is a runtime error, and so is any other number.
position In Int32 -1 Where in the chain it goes: -1 (the default) at the end, 0 before the first effect, 1 before the second, and so on. A position past the end puts it at the end. Below -1 is a runtime error.

Description

BlitzLLVM This command does not exist in the original Blitz products. BlitzLLVM adds it.

Adds an effect to the chain of a bus: a filter, EQ, echo, reverb, compressor, limiter, distortion or lo-fi. The effect works on everything that plays on the bus and on the buses that feed it, and keeps ringing after their sounds stop. See Audio effects. This is a BlitzLLVM extension.

Differences

  • The effects of a bus run in the order of the chain, then the volume of the bus is put on, and the result goes to the bus it feeds. A new effect starts with the defaults of its type.

Examples

Include "<audio.bb>"
world = CreateAudioBus()
muffle = AddAudioEffect(world, BB_EFFECT_LOWPASS)
AudioEffectParam muffle, BB_EFFECTPARAM_FREQUENCY, 800

@return The effect, for AudioEffectParam, AudioEffectBypass and FreeAudioEffect. Effect handles are never the handle of a bus.

Related Commands

ApplyAudioScene BlitzLLVM, AudioBusParent BlitzLLVM, AudioBusVolume BlitzLLVM, AudioEffectBypass BlitzLLVM, AudioEffectParam BlitzLLVM, AudioSceneBypass BlitzLLVM, FreeAudioEffect BlitzLLVM, GetAudioEffectParam BlitzLLVM

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally