zhuker / lamejs

mp3 encoder in javascript
Other
820 stars 200 forks source link

fix NaN buffer samples caused by fractional index when filter_l is odd #57

Closed rkramer1964 closed 5 years ago

rkramer1964 commented 5 years ago

Using chrome/firefox under windows with a filter_l of 31 caused an index (j2) to be computed as nn.5 (e.g. -29.5) resulting in and undefined y and NaN for xvalue in fill_buffer_resample. This caused silence to be returned when encoding mp3 samples from PCM.

Noted in Rocket.Chat when trying to record audio messages under windows.

rkramer1964 commented 5 years ago

accidentally closed