Audio

An audio buffer loaded completely in memory.

  • Audio(file_path: str, volume: float = 1.0)

Properties


NameDescriptionType
volumeThe volume of the audio, from 0.0-1.0, with values above 1.0 allowed for amplification.float

Methods


Play

play() None

Play the audio.

Note:

Playing the audio again while it's already playing plays a separate sound instance, meaning multiple plays can overlap.

Stop

stop() None

Stop all instances of currently playing audio.