massoudss / waveformSeekBar

Android Waveform SeekBar library
488 stars 81 forks source link

How to link waveform with audio #51

Closed timplifier closed 1 year ago

massoudss commented 1 year ago

You can set sample using described methods. See Link.

timplifier commented 1 year ago

I mean, when audio is playing changing the waveform progress

massoudss commented 1 year ago

So you have to change wavefrom progress as soon as your audio is playing. For example if your audio is 100 seconds you should change progress from 0 to 100 every second.

wavefrom.progress = 0f to 100f

If you want a smooth progress, progress value should be updated in sooner intervals e.g. every 100 ms.