简体   繁体   中英

How can I get Audio Stream from MediaPlayer in Android

I tried to display audio stream for visualization, and I found MediaPlayer.snoop(short[], int) to get audio stream playing now on Mediaplayer

So I did the code:

Class c = MediaPlayer.class;
Method m = c.getDeclaredMethod("snoop", outData.getClass(), Integer.TYPE );

But there is an exception error: No such function in Mediaplayer

Couldn't I use the code above or is it impossible to get audio stream?

Help me!! Thank you.

snoop api尚未公开(即它不暴露在外面使用),所以你不能在你的应用程序中使用它,除非你在Android源代码中插入你的应用程序并编译antire android源代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM