如何获取Android中媒体播放器的幅度? [英] How to get amplitude of media player in Android ?

查看:76
本文介绍了如何获取Android中媒体播放器的幅度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个vu-meter,它可以对声音做出反应,就像一个 live-wallpaper 谁能帮我...

I want to develop an vu-meter and it reacts with sound, like a live-wallpaper Can anybody help me...

推荐答案

使用MediaRecorder.getMaxAmplitude

Use MediaRecorder.getMaxAmplitude

此方法返回自上次调用此方法以来采样的最大绝对振幅.仅在setAudioSource()之后调用此函数.

This method returns the maximum absolute amplitude that was sampled since the last call to this method. Call this only after the setAudioSource().

http://developer.android.com/reference/android/media/MediaRecorder.html

这篇关于如何获取Android中媒体播放器的幅度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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