simvx.core.audio

Audio system: background music, UI sounds, and 3D spatial audio.

This module provides:

  • AudioStream: Audio resource (WAV/OGG data)

  • AudioStreamPlayer: Background music/UI sounds

  • AudioStreamPlayer2D: 2D positional audio with panning

  • AudioStreamPlayer3D: 3D spatial audio with attenuation

Public API::

from simvx.core import AudioStream, AudioStreamPlayer, Resource

# Filesystem audio file
player = AudioStreamPlayer(stream="music/theme.ogg", autoplay=True)

# Asset shipped inside a Python package
sfx = AudioStreamPlayer2D(stream=Resource("game.assets", "explosion.wav"))
sfx.play()

# Synthetic procedural tone
beep = AudioStreamPlayer(stream=AudioStream.tone(440))
beep.play()

This module is a thin facade. The implementation lives in private leaf modules: _audio_stream (the :class:AudioStream resource + container detection / WAV seek helpers), _audio_playback (the shared

class:

_AudioPlaybackMixin), and _audio_players (the three player nodes). Import the public names from here or from :mod:simvx.core.

Module Contents

Data

API

simvx.core.audio.__all__

[‘AudioStream’, ‘AudioStreamPlayer’, ‘AudioStreamPlayer2D’, ‘AudioStreamPlayer3D’]