Stream

A streaming audio resource intended for long music files. Access via the 'mixer' submodule.

Inherits from Audio.

Properties


NameDescriptionType
playback_posCurrent position in seconds. 0.0 if stopped/never played, paused position if paused.float
loopingWhether the stream should loop when it reaches the end.bool

Methods


Pause

pause() None

Pause playback. Releases the hardware track but preserves position.

Resume

resume(fade_in: float = 0.0) None

Resume playback from a paused state.

Args

  • fade_in : Duration in seconds to fade back in. Defaults to 0.0.

Seek

seek(seconds: float) None

Jump to a specific time in the audio file.

Args

  • seconds : Target position in seconds from the start.