Stream

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

Inherits from Audio.

Properties


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

Methods


Pause

pause() None

Pause playback. Releases the hardware track but preserves position.

Resume

resume(fade_in: SupportsFloat = 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: SupportsFloat) None

Jump to a specific time in the audio file.

Args

  • seconds : Target position in seconds from the start.