attachAudio

suspend fun attachAudio(track: Int, audio: AudioSource?): Result<Unit>

Replaces the audio source on a track, closing the previous source first.

The new source is opened immediately, even if the mixer has not started.

Return

The result of opening the new source, or success when detaching.

Parameters

track

The audio track identifier.

audio

The source to attach, or null to detach the current source.