wad icon indicating copy to clipboard operation
wad copied to clipboard

Adding Stronger Sound Caching/Grouping Functionality

Open frastlin opened this issue 1 year ago • 1 comments

Hello, I am wondering if caching/grouping functionality, similar to HowlerJS could please be implemented? There are two problems with how Wad handles sounds:

  1. A sound environment with thousands of objects loading from a sound bank of 20-50 sounds is gigs of ram in Wad, instead of the KBs of ram it is in Howler. This is because the same buffer source is used across different instances of that sound and play function in Howler, rather than duplicating the buffer in Wad. Wad will have a Howl sound, and every time play is called, an ID is returned from play, allowing for sound manipulation.
  2. When the browser is asked to play the thousands of sounds at once in Wad, it chokes and dies in Wad, but handles the same number of sounds in Howler just fine.

Wad has many other features Howler does not have, but this caching/grouping functionality is currently critical for us to continue development.

frastlin avatar Sep 20 '22 21:09 frastlin

I could probably implement some form of caching.

Can you show me a minimal example that demonstrates the issue? How are you measuring RAM usage?

rserota avatar Sep 21 '22 18:09 rserota