I am working on an AudioVisualizer in Jetpack Compose. Simply put: I poll the
maxAmplitude
from
MediaRecorder
every
75ms
. Now I have tried 2 different approaches:
• Canvas -> Draw the visualization and automatically hide items that are not visible
• LazyRow with Boxes for each item and then when the itemCount changes I
scrollToItem
to the last item
Both work, however the scrolling feels choppy and not smooth. How can I get a smooth consistent scroll (while recording with the
MediaRecorder
). Preferably using the
LazyRow
method so that I can also scroll back. Do I need to do the scrolling infinitely (until I stop recording) based on the timing I use for the polling of my