tModLoader v2025.08
A mod to make and play Terraria mods
SoundPlayer Class Reference

Public Member Functions

ActiveSoundFindActiveSound (in SoundStyle style)
 
void PauseAll ()
 
void PauseOrStopAll ()
 
SlotId Play (in SoundStyle style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
 
void Reload ()
 
void ResumeAll ()
 
void StopAll ()
 
void StopAll (in SoundStyle style)
 Stops all sounds matching the provided SoundStyle. Use StopAll(in SoundStyle, int) instead if stopping just a specific variant is desired.
 
void StopAll (in SoundStyle style, int variant)
 Stops all sounds matching the provided SoundStyle and variant choice. Use StopAll(in SoundStyle) instead if stopping all variants is desired.
 
bool TryGetActiveSound (SlotId id, [NotNullWhen(true)] out ActiveSound? result)
 Safely attempts to get a currently playing ActiveSound instance, tied to the provided SlotId.
 
void Update ()