jsantell / dancer.js

high-level audio API, designed to make sweet visualizations
jsantell.github.com/dancer.js
MIT License
2.11k stars 211 forks source link

On update method in dancer.js, buffers.reduce sum argument takes parameters, and it shouldn't #26

Closed 0x705h closed 11 years ago

0x705h commented 11 years ago

I just downloaded the lastest version of dancer and while i was trying to get working the fft on an audio file the following error was fired up:

"prev is not defined" in line 468 which is: buffers.reduce( sum( prev, curr ) ) / channels

this should be changed to buffers.reduce( sum ) / channels

I hope this helps :) bye!!!

jsantell commented 11 years ago

Hm, what webkit browser/filetype were you using that you came across this? Was an untested multi-channel that was in Canary for awhile

0x705h commented 11 years ago

Chrome Versión 19.0.1084.46 - I guess is the lastest available in my distro, which is Linux Mint. The filetype is a mp3. I guess that what i did fixed the issue, but in the rush, I really don't know if this is the real issue, and my fix really fixed it.

jsantell commented 11 years ago

The original fix was from Canary (v21?) awhile ago that had multiple channels for an audio file (where current and canary both do not right now), and the fix worked previously -- a recent PR moved the fn to a var instead of an anonymous function, and I don't have any browsers that use two channels anymore, gotta write a test for it. Just pushed the changes, so you should be good to go :)

0x705h commented 11 years ago

Thank you very much! you're awesome! :)

jsantell commented 11 years ago

:metal: thanks for reporting it :)

gr0uch commented 11 years ago

Oops, this was actually my bad >_<

jsantell commented 11 years ago

no problem, it minimized code and slipped under the radar due to Canary only having one channel now :)