mini_arcade_core.runtime.audio.audio_port¶
Service interfaces for runtime components.
Classes¶
Interface for audio playback operations. |
Module Contents¶
- class mini_arcade_core.runtime.audio.audio_port.AudioPort¶
Interface for audio playback operations.
- 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.