Okazari / Rythm.js

A javascript library that makes your page dance.
https://okazari.github.io/Rythm.js/
GNU General Public License v3.0
3.93k stars 250 forks source link

Fix possible NaN return value in Analyser.getFrequenceRatio #62

Closed jacobgunnarsson closed 7 years ago

jacobgunnarsson commented 7 years ago

Im connecting an external <audio>-element and found that I was getting NaN ratio values passed to Dancer.dance.

I traced it back to Analyser.getFrequencyRatio where actualValue would sometimes be divided byscale that would be 0. I don't know if this is the optimal fix, but it seems to work.

Thanks for a great lib!

Okazari commented 7 years ago

Thanks for the feedback, this issue were found and is currently adressed on the develop branch in an other previous pull request. I plan to release it before the end of the week :)

jacobgunnarsson commented 7 years ago

Ah ok, good stuff, I'll close this.