3

the android.media.audiofx.Visualizer class has an method

public int getWaveForm (byte[] waveform)

that returns x,y coordinates for visualizing the waveform of an audioSession:

public Visualizer (int audioSession)

Is it possible to use the Visualizer without requiring a sound file to play?

If not, is there an equivalent library that does this?:

 public int getWaveForm (byte[] waveform)

note: the following answer is not right even though it is marked CLOSED - Android - create waveform of the audio file (OGG)

Community
  • 1
  • 1
dangduc
  • 31
  • 3

1 Answers1

0

Yes, use Visualizer(0), it will use the output mix.

https://developer.android.com/reference/android/media/audiofx/Visualizer.html

4b0
  • 21,981
  • 30
  • 95
  • 142
Carlos Oliveira
  • 846
  • 10
  • 23