massoudss / waveformSeekBar

Android Waveform SeekBar library
488 stars 81 forks source link

a wave form sample of zeroes causes the WaveFormSeekbar to not be Rendered. #28

Closed anasmadrhar closed 3 years ago

anasmadrhar commented 3 years ago

Hello, Using an intArray of zeroes will cause the seekbar to be invisible or not rendered waveFormSeekbar.setSampleFrom(intArrayOf(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)) this is probably because of MaxValue being 0 which leads to a NaN in the waveHeight variable inside onDraw.

massoudss commented 3 years ago

Hi Please update the waveformSeekBar to 3.1.0 & the Amplituda to 2.1.0.