mini_arcade_core.runtime.audio.audio_adapter¶
Module providing runtime adapters for window and scene management.
Classes¶
A no-op audio adapter. |
Module Contents¶
- class mini_arcade_core.runtime.audio.audio_adapter.SDLAudioAdapter(backend: mini_arcade_core.backend.Backend)¶
Bases:
mini_arcade_core.runtime.audio.audio_port.AudioPortA no-op audio adapter.
- backend¶
- load_sound(sound_id: str, file_path: str)¶
Load a sound from a file and associate it with an identifier.
- Parameters:
sound_id (str) – Identifier to associate with the sound.
file_path (str) – Path to the sound file.
- play(sound_id: str, loops: int = 0)¶
Play the specified sound.
- Parameters:
sound_id (str) – Identifier of the sound to play.
loops (int) – Number of times to loop the sound. 0 = play once, -1 = infinite loop, 1 = play twice, etc.