New games every week!
Well, that was a waste of time Blog
16th March 2019
First (failed) attempt at making an audio "sprite sheet" for the various ingame sounds.[/highlight]
Hmm..
Browser incompatibilities fail me again!!

-=-=-

The audio sound player functionality of html has a handy little thing where you can play a sound from x to y offset, thus allowing you to cram all your audio into one bit .wav, and play snippets to act like different sounds..
So I wrote a little program to combine all the audio samples into one giant (320kb) file, and .. Bingo!!

And.. .. As much as that works, it requires you to use "seconds" as the offsets, which isn't "too" bad, but breaks as soon as you add pitch into the mix.
On some browsers, the "seconds" are retained from the default pitch.
On other browsers, the "seconds" are recalculated based on the new pitch, so you end up with bits of one sound bleeding through to another.

Aw.. fucksake..

I've undone a lot of what I've done, today, and everything (I think!) should now be working the way it was, earlier.
This "feature" will have to wait until all browser makers have decided on what they're supposed to be flamin' well doing!

*sigh*
What a waste of a morning.
Views 102, Upvotes 19  
Shoebox
New games every week!
Site credits : If you can see it, Jayenkai did it.
(c) Jayenkai 2023 and onwards, RSS feed 4

Blog - Well, that was a waste of time - AGameAWeek