I am a beginner to Android.I want to find the frequency density or volume amplitude in Android or using Android Media Player for an mp3 file.I tried many different ways but I didn't got succeeded.Can you please help me with this
I have found this code but it is giving the getMaxAmplitude() value in audio recorder time but not getting the at the time of playing mp3 file. Following is the link: What does Android's getMaxAmplitude() function for the MediaRecorder actually give me?
public double getNoiseLevel()
{
Log.d("SPLService", "getNoiseLevel() ");
int x = mRecorder.getMaxAmplitude();
double x2 = x;
Log.d("SPLService", "x="+x);
double db = (20 * Math.log10(x2 / REFERENCE));
//Log.d("SPLService", "db="+db);
if(db>0)
{
return db;
}
else
{
return 0;
}
}
I also refer of ringdroid link :https://code.google.com/p/ringdroid/
I also checked FFT but it is at the recording time.I need to detect the frequency / Amplitude while playing the Audio File (mp3 file).