Skip to content

Releases

v1.1.0

Choose a tag to compare

@cpojer cpojer released this 09 Nov 01:27
v1.1.0
fc48447
  • Added previewSeconds to audio.sound() to reduce memory used by preloaded sound effects. Playback starts from a decoded opening while the rest of the sound decodes in the background. Overlapping voices share that decode. Firefox continues to use a single fully decoded buffer.
  • Added sampleRate to createAudio(). Use 48_000 to match the included AAC music decoder when the output device prefers a different rate.
  • Fixed short music buffers running out between refills.
  • Fixed sound previews cutting out at fractional playback rates or when reversing direction. Loop events now stay in sync with playback when decoding stalls.
  • Fixed Web Audio falling back to HTML audio when a download is interrupted after the response starts. HTML audio now also reports errors that occur after loading.
  • Fixed fades completing early when a voice ends, looping is disabled, or a sound is seeked before playback. Per-voice fades now report completion under the original playback ID, even when a voice is reused.
  • Added a migration guide for Howler users. [Migration guide](https://github.com/nkzw-tech/audio/blob/fc48447/README.md#migrating-from-howler)

v1.0.0

Choose a tag to compare

@cpojer cpojer released this 08 Nov 13:35
v1.0.0
ba0f60d

Initial release and forked from Howler.js.

Differences from Howler

  • Deduplicated audio unlock attempts from touch and click events.
  • Removed a test playback that could log an autoplay warning when the HTML audio pool ran out.
  • Fixed duplicate resume callbacks while preserving overlapping effects queued during resume.
  • Fixed ended and readiness listener cleanup, and guarded against callbacks firing after a sound was unloaded.
  • Added @nkzw/audio/music for bounded music playback with AAC decoding in a worker. This caps decoded music memory as tracks get longer, which helps on iOS Safari.
  • Rewrote the engine in strict TypeScript targeting ES2022 and moved the build to Vite+ and tsdown.
  • Removed obsolete browser workarounds and replaced the global singleton with explicit mixer instances.
  • Added mixer dispose() and improved unload() so native resources and shared decoded audio are released when they’re no longer in use.