ttencate / jfxr

A browser-based tool to create sound effects for games.
http://jfxr.frozenfractal.com/
429 stars 45 forks source link

Play preview sound on release of slider, not during drag #39

Closed blurymind closed 5 years ago

blurymind commented 5 years ago

Right now when you change a parameter, the sound plays as you drag the slider. This results in the sound being repeated over itself - not playing to the end until you release it.

I think it will be generally better to hear it from start to end when the mouse releases the slider instead of as you are dragging it. That way the sound will play from start to end clearly and we wont have to click on the play button after that to hear it out properly

ttencate commented 5 years ago

Agreed. This is not entirely trivial because of the way Angular works (we need the model to change because we want to update the numbers during slider changes), but of course it can and should be done.

blurymind commented 5 years ago

that was fast! 😄 thank you!!

ttencate commented 5 years ago

It's just a debounce, not an exact implementation of your suggestion. This was simpler to do and solves 80% of the problem, I think.