Search code examples
javaandroidparsingmp3wav

Java/Android: How to get a spectrum of the MP3/wav file?


I need to draw a spectrum of MP3 (or wav) file. I know FFT method, but I don't how to access to the content of the mp3/wav file on java/android platform. I don't know how to parse mp3/wav format... Is there a framework which can do this?


Solution

  • There's no built-in support in Android for directly retrieving the pcm data from an audio file. There's a nice open-source project, ringdroid, that would be a nice starting place for a roll-your-own code to read an mp3 or wav file. You can also look into including a third-party library into your code.