tModLoader v2024.09
A mod to make and play Terraria mods
ASoundEffectBasedAudioTrack Class Referenceabstract

Inherits IAudioTrack, and IDisposable.

Inherited by MP3AudioTrack, OGGAudioTrack, and WAVAudioTrack.

Public Member Functions

abstract void Dispose ()
 
void Pause ()
 
void Play ()
 
void Resume ()
 
abstract void Reuse ()
 
void SetVariable (string variableName, float value)
 
void Stop (AudioStopOptions options)
 
void Update ()
 
void Pause ()
 
void Play ()
 
void Resume ()
 
void Reuse ()
 
void SetVariable (string variableName, float value)
 
void Stop (AudioStopOptions options)
 
void Update ()
 

Protected Member Functions

void CreateSoundEffect (int sampleRate, AudioChannels channels)
 
void PrepareBuffer ()
 
virtual void PrepareToPlay ()
 
virtual void ReadAheadPutAChunkIntoTheBuffer ()
 
void ResetBuffer ()
 

Protected Attributes

byte[] _bufferToSubmit = new byte[4096]
 
DynamicSoundEffectInstance _soundEffectInstance
 
float[] _temporaryBuffer = new float[2048]
 

Static Protected Attributes

const int bufferCountPerSubmit = 2
 
const int bufferLength = 4096
 
const int buffersToCoverFor = 8
 

Properties

bool IsPaused [get]
 
bool IsPlaying [get]
 
bool IsStopped [get]
 
- Properties inherited from IAudioTrack
bool IsPaused [get]
 
bool IsPlaying [get]
 
bool IsStopped [get]
 

Member Function Documentation

◆ Pause()

void ASoundEffectBasedAudioTrack.Pause ( )

Implements IAudioTrack.

◆ Play()

void ASoundEffectBasedAudioTrack.Play ( )

Implements IAudioTrack.

◆ Resume()

void ASoundEffectBasedAudioTrack.Resume ( )

Implements IAudioTrack.

◆ Reuse()

abstract void ASoundEffectBasedAudioTrack.Reuse ( )
pure virtual

Implements IAudioTrack.

◆ SetVariable()

void ASoundEffectBasedAudioTrack.SetVariable ( string  variableName,
float  value 
)

Implements IAudioTrack.

◆ Stop()

void ASoundEffectBasedAudioTrack.Stop ( AudioStopOptions  options)

Implements IAudioTrack.

◆ Update()

void ASoundEffectBasedAudioTrack.Update ( )

Implements IAudioTrack.

Property Documentation

◆ IsPaused

bool ASoundEffectBasedAudioTrack.IsPaused
get

Implements IAudioTrack.

◆ IsPlaying

bool ASoundEffectBasedAudioTrack.IsPlaying
get

Implements IAudioTrack.

◆ IsStopped

bool ASoundEffectBasedAudioTrack.IsStopped
get

Implements IAudioTrack.