For JollyPixel Engine, we want a complete and mature Audio API that meets developers’ needs while staying simple and easy to integrate.
Under the hood, our Audio API will use:
However, we should design our interfaces/adapters in a way that also allows support for:
Building our own abstraction layer is important so we:
- Keep a consistent engine-level API
- Avoid tight coupling with a specific audio library
- Prepare for future editor tooling and UX
Required Features
-
Integrated with the asset management system
-
Global Audio manager (singleton)
- Master volume
- Master mute
- Support Volume by category (
UI, Music, SFX, etc.)
-
Serializable (no localStorage concerns at API level)
-
Cache and deduplication of audio buffers
-
Helpers for spatial/3D sounds
-
Anti-spam protection (cooldown / max instances per sound)
-
Support for looping sounds
-
Support for fade in / fade out
-
Clean ECS integration (AudioSource component + Listener)
Any idea, feel free to comment
For JollyPixel Engine, we want a complete and mature Audio API that meets developers’ needs while staying simple and easy to integrate.
Under the hood, our Audio API will use:
https://threejs.org/docs/#Audio
However, we should design our interfaces/adapters in a way that also allows support for:
https://howlerjs.com/
Building our own abstraction layer is important so we:
Required Features
Integrated with the asset management system
Global Audio manager (singleton)
UI,Music,SFX, etc.)Serializable (no localStorage concerns at API level)
Cache and deduplication of audio buffers
Helpers for spatial/3D sounds
Anti-spam protection (cooldown / max instances per sound)
Support for looping sounds
Support for fade in / fade out
Clean ECS integration (AudioSource component + Listener)