Table of Contents

Method StartAudioStream

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

StartAudioStream(AudioStreamIdentifier, string, bool, TimeSpan, float, float)

Assign one of the available audio streams to play a specific file. This mechanism can be used
to replace regular music playback, and synchronize it between clients.

public void StartAudioStream(AudioStreamIdentifier streamIdentifier, string resRef, bool looping = false, TimeSpan fadeTime = default, float seekOffset = -1, float volume = 1)

Parameters

streamIdentifier AudioStreamIdentifier

The audio stream/channel to use for playing audio.

resRef string

The audio resref to play.

looping bool

If the audio should loop.

fadeTime TimeSpan

An optional fade in time for the audio.

seekOffset float

The offset to seek in the audio track. If this is greater than the length of the track, it will loop back to the start.

volume float

The volume to set on the audio stream.