pixiebrix / pixiebrix-extension

PixieBrix browser extension
https://www.pixiebrix.com
GNU Affero General Public License v3.0
83 stars 22 forks source link

Revive the sound effect brick #1997

Closed twschiller closed 2 years ago

twschiller commented 2 years ago

Context

Implementation Sketch

Helpful Articles

fregante commented 2 years ago

If instantaneous playback isn't required, we might just use new Audio().src = 'file.mp3' instead.

Howler would only be useful to have complete control over the playback of the file, for example to be used in video games where the sounds needs to match the video effect and must be pre-loaded.

The regular audio element is fine for a local file, without a sprite, adding minimal playback delay (I'm guessing less than 300ms). I can take care of splitting that sprite up if you want to preserve those sound effects.

twschiller commented 2 years ago

Good idea and worth an experiment to see what the latency would be. That would also better allow for playing remote sound effects

I can take care of splitting that sprite up if you want to preserve those sound effects

I'm not tied to these sound effects. They just happened to be what I came across in public domain when I originally tried prototyping the feature

I'll connect with @MMirandi to see what sound effects would be most useful (probably cheer, gong, etc.)