How chasingimagines/audiosystem works
AudioSystem is a Unity package for catalog-driven sound effects and background music. The principal runtime workflow is application code calling the static API, which resolves a sound ID through the catalog database, obtains a pooled emitter, and plays the resource; music uses a separate crossfade manager. The editor provides searchable catalog-backed ID selection. The graph follows the shown API, pooling, and manager calls; the small AudioExtensions implementation was read, but its specific call relationship is not shown in the supplied excerpt.
Main entry points: AudioSystem.cs AudioSystem API · AudioKeyDrawer.cs Audio Key Drawer · SoundManager.cs Sound Manager · AudioKey.cs AudioKey
Components 13
Inspector Authoring
- Audio Key Drawer
Editor/AudioKeyDrawer.cs - ID Dropdown
Editor/AudioIdDropdown.cs
Catalog Resolution
- Audio Catalog
Runtime/AudioCatalog.cs - Audio Database
Runtime/AudioDatabase.cs
Audio API
- AudioKey
Runtime/AudioKey.cs - AudioId Attribute
Runtime/AudioIdAttribute.cs - Audio Extensions
Runtime/AudioExtensions.cs - AudioSystem API
Runtime/AudioSystem.cs
Playback Engines
- Sound Manager
Runtime/SoundManager.cs - Sound Emitter
Runtime/SoundEmitter.cs - Music Manager
Runtime/MusicManager.cs - Persistent Singleton
Runtime/PersistentSingleton.cs
Other components
- Application Code
Connections 16
- Application Code → AudioSystem API: plays or stops
README.md - Application Code → AudioKey: uses key
README.md - AudioKey → AudioSystem API: delegates play
Runtime/AudioKey.cs - Audio Extensions → AudioSystem API: uses API
Runtime/AudioExtensions.cs - Audio Key Drawer → ID Dropdown: opens
Editor/AudioKeyDrawer.cs - Audio Key Drawer → Audio Catalog: reads entries
Editor/AudioKeyDrawer.cs - Audio Key Drawer → AudioKey: draws field
Editor/AudioKeyDrawer.cs - Audio Key Drawer → AudioId Attribute: draws field
Editor/AudioKeyDrawer.cs - AudioSystem API → Audio Database: looks up IDs
Runtime/AudioSystem.cs - Audio Database → Audio Catalog: registers entries
Runtime/AudioDatabase.cs - AudioSystem API → Sound Manager: gets emitter
Runtime/AudioSystem.cs - AudioSystem API → Music Manager: controls music
Runtime/AudioSystem.cs - Sound Manager → Sound Emitter: creates and pools
Runtime/SoundManager.cs - Sound Emitter → Sound Manager: returns to pool
Runtime/SoundEmitter.cs - Sound Manager → Persistent Singleton: inherits
Runtime/SoundManager.cs - Music Manager → Persistent Singleton: inherits
Runtime/MusicManager.cs