tModLoader v0.11.8.9
A mod to make and play Terraria mods
Terraria.ModLoader.Audio.MusicStreamingMP3 Class Reference
+ Inheritance diagram for Terraria.ModLoader.Audio.MusicStreamingMP3:
+ Collaboration diagram for Terraria.ModLoader.Audio.MusicStreamingMP3:

Public Member Functions

 MusicStreamingMP3 (string path)
override void Reset ()
override void Stop (AudioStopOptions options)
- Public Member Functions inherited from Terraria.ModLoader.Audio.MusicStreaming
 MusicStreaming (string path)
override void CheckBuffer ()
void Dispose ()
override void Pause ()
override void Play ()
override void Resume ()
override void SetVariable (string name, float value)
override void Stop (AudioStopOptions options)
virtual void CheckBuffer ()
abstract void Pause ()
abstract void Play ()
abstract void Reset ()
abstract void Resume ()
abstract void SetVariable (string name, float value)
abstract void Stop (AudioStopOptions options)

Protected Member Functions

override void PrepareStream ()
- Protected Member Functions inherited from Terraria.ModLoader.Audio.MusicStreaming
virtual void FillBuffer (byte[] buffer)
abstract void PrepareStream ()

Private Attributes

Stream underlying

Additional Inherited Members

- Static Public Member Functions inherited from Terraria.ModLoader.Audio.Music
static implicit operator Music (Cue cue)
- Protected Attributes inherited from Terraria.ModLoader.Audio.MusicStreaming
AudioChannels channels
int sampleRate
Stream stream
- Properties inherited from Terraria.ModLoader.Audio.MusicStreaming
override bool IsPaused [get]
override bool IsPlaying [get]
- Properties inherited from Terraria.ModLoader.Audio.Music
abstract bool IsPaused [get]
abstract bool IsPlaying [get]

Detailed Description

Definition at line 181 of file MusicWrappers.cs.

Constructor & Destructor Documentation

◆ MusicStreamingMP3()

Terraria.ModLoader.Audio.MusicStreamingMP3.MusicStreamingMP3 ( string  path)

Definition at line 185 of file MusicWrappers.cs.

Member Function Documentation

◆ PrepareStream()

override void Terraria.ModLoader.Audio.MusicStreamingMP3.PrepareStream ( )

◆ Reset()

override void Terraria.ModLoader.Audio.MusicStreamingMP3.Reset ( )

Implements Terraria.ModLoader.Audio.Music.

Definition at line 201 of file MusicWrappers.cs.

201 {
202 if (stream != null) {
203 underlying.Position = 0;
204 //mp3 is not designed to loop and creates static if you just reset the stream due to fourier encoding carryover
205 //if you're really smart, you can make a looping version and PR it
206 stream = new MP3Stream(underlying);
207 }
208 }

References, and Terraria.ModLoader.Audio.MusicStreamingMP3.underlying.

◆ Stop()

override void Terraria.ModLoader.Audio.MusicStreamingMP3.Stop ( AudioStopOptions  options)

Reimplemented from Terraria.ModLoader.Audio.MusicStreaming.

Definition at line 196 of file MusicWrappers.cs.

196 {
197 base.Stop(options);
198 underlying = null;
199 }

References Terraria.ModLoader.Audio.MusicStreamingMP3.underlying.

Member Data Documentation

◆ underlying

Stream Terraria.ModLoader.Audio.MusicStreamingMP3.underlying