New games every week!
Well, that was a waste of time
16th March 2019  
First (failed) attempt at making an audio "sprite sheet" for the various ingame sounds.
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!

What a waste of a morning.

Views 26, Upvotes 2
New games every week!
Site credits : PHP script, Blog posts, Games, Music, Pixelart, Poems and More : Jayenkai
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - Well, that was a waste of time - AGameAWeek