在移动图实时上绘制android记录样本的幅度 [英] Plotting android recording samples's amplitude on moving graph RealTime

查看:50
本文介绍了在移动图实时上绘制android记录样本的幅度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个录音应用程序,为此,我尝试在Android View上绘制音频录音样本的幅度随时间的变化,类似于下图.

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.

我尝试使用MPChart Library的LineChart,但结果仍然不符合预期.

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

MPChart主页上有这样一个图形的屏幕截图,但无法确定如何实现.

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

请帮助. 谢谢.

推荐答案

您可以为此使用LineChart,这是官方RealtimeLineChartActivity:

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

官方RealtimeLineChartActivity例子

Oficial RealtimeLineChartActivity example

与示例一样,您应该定期(可运行)将其他线程的数据馈入(feedMultiple方法)

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

希望有帮助

这篇关于在移动图实时上绘制android记录样本的幅度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆