android: Visualization of sound from Spotify

2.1k views Asked by At

Im using the android.media.audiofx.Visualizer class to visualize music on my android device. Im using the Visualizer constructor with session ID = 0 so the audio output mix is used as datasource but it do not work with Spotify. Google Play Music works like expected but I want to visualize Spotify audio. Can I do this or is spotify using some kind of work around for music output?

With spotify I get in the onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) method only 0 in the byte array and with onWaveFormDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) I get the values -128 in the byte array.

0

There are 0 answers