I'm trying to write an Android app that analyzes content from the user's music library. Let's assume that these are mp3 files on the SD drive, for starters. I'm able to find Java algorithms to analyze music files, but I can't find an API to read and decode the files (not play them. There's an API to play the files, and even classes for audio effects, but I don't see any way for an app to get to the decoded data from a music file. I can read from microphone.
J2SE has a class AudoInputStream,but it's not part of Android. Any suggestions?
My real purpose was to be able to look at the files in my android music library and classify them by tempo. I was looking for libraries to help with this, but I came across a service called Echo Nest that worked fine from my Android for calculating BPM on mp3 files.
来源:https://stackoverflow.com/questions/4575357/need-android-equivalent-of-audioinputstream