3

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.

SamSPICA
  • 1,366
  • 15
  • 31

1 Answers1

1

The snoop api is not made public yet(i.e it is not exposed for use outside), so you cannot use it in your application unless you plug your application in android source code and compile the antire android source code.

potter
  • 281
  • 1
  • 3