Skip to content

AudioService.StopBus(string, float) Method

Definition

Namespace: Brine2D.Audio

Stops all tracks tagged with bus with optional fade-out.

public void StopBus(string bus, float fadeOutSeconds=0f);

Parameters

bus System.String

Bus name to stop.

fadeOutSeconds System.Single

Fade-out duration in seconds. Zero means immediate stop.

Implements StopBus(string, float)

Remarks

When fadeOutSeconds is greater than zero and the bus contains the active music track, the music fade is handled by the managed crossfade state machine. Non-music sound-effect tracks on the same bus are stopped immediately in this case because the native tag-based fade would conflict with the managed music fade.