I am working on some music analysis using the Visualizer class on Android 2.3.1. I find that the size of the FFT and waveform is affected by the volume of the device. This means that if the user has a volume, I get little or no FFT data.
I tested this on a Motorola Xoom, Samsung Galaxy Tab and emulator, and it behaves that way.
I am using the following code:
mp = new MediaPlayer(); mp.setDataSource("/sdcard/sine1.wav"); mp.prepare(); mp.setLooping(true); mp.start(); int audioSessionID = mp.getAudioSessionId(); v = new Visualizer(audioSessionID); v.setEnabled(true);
Looking at the documents for the Visualizer class , it seems that if we pass a valid identifier for an audio session, then the visualizer should work with this audio session. Visualizer seems to be working on an output connection.
Has anyone else come across this or found a way around it?
thanks
android fft audio media-player visualizer
user1035335
source share