I am building an android app, having feature of capturing sound through microphone and playing it through headphone. For this, I have used "AudioRecord" and "AudioTrack". Following is some part of code that I am using,(just for understanding)
mInBufferSize = AudioRecord.getMinBufferSize(mSampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, mFormat);
mOutBufferSize = AudioTrack.getMinBufferSize(mSampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, mFormat);
mAudioInput = new AudioRecord(MediaRecorder.AudioSource.MIC,
mSampleRate, AudioFormat.CHANNEL_CONFIGURATION_MONO, mFormat,
mInBufferSize);
mAudioOutput = new AudioTrack(AudioManager.STREAM_MUSIC, mSampleRate,
AudioFormat.CHANNEL_CONFIGURATION_MONO, mFormat,
mOutBufferSize, AudioTrack.MODE_STREAM);
But the main problem is that I want to record incoming sound in mp3 format? Please help me in this, I will really appreciate...
Thanks in Advance