SimformSolutionsPvtLtd / audio_waveforms

Use this plugin to generate waveforms while recording audio in any file formats supported by given encoders or from audio files. We can use gestures to scroll through the waveforms or seek to any position while playing audio and also style waveforms
https://pub.dev/packages/audio_waveforms
MIT License
245 stars 125 forks source link

Fixed waveform for audios under 1 second not being extractable on Android #259

Closed mschudt closed 2 months ago

mschudt commented 4 months ago

Fixed divison by zero due to duration value being rounded to 0 for audios under 1 second length. I changed the variable from duration (in seconds) to durationMillis which fixes an exception that was thrown.

Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 39 pos 10: '<optimized out>'