Plotting android recording samples's amplitude on moving graph RealTime

穿精又带淫゛_ 提交于 2019-12-24 08:57:41

问题


I'm developing a recording app, for which I am trying plot amplitude of audio recording samples against time on Android View similar to below image.

The graph should move with time towards the left side of the screen.

I tried using LineChart of MPChart Library but still, the result is not as expected.

MPChart homepage has a screenshot of such graph, but couldn't figure it how to implement.

Please help. Thank you.


回答1:


You can use LineChart for that, here is official RealtimeLineChartActivity:

Oficial RealtimeLineChartActivity example

Like in the sample, you should feed (feedMultiple method) it with data from other Thread, periodically (Runnable)

Hope that helps



来源:https://stackoverflow.com/questions/50508159/plotting-android-recording-sampless-amplitude-on-moving-graph-realtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!