0

I am using following code to record the sound in my Galaxy S2.

Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION);

But this code is storing it in .3ga file.

In my app, I need to find the maximum amplitude of the sound. But Java sound does not support the .3ga file. Can someone please tell me how can I tackle this problem?

Thanks in advance!

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
shriguru nayak
  • 310
  • 1
  • 3
  • 21

1 Answers1

0

You can use AudioRecord to record the audio.

AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, 44100, AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT, bufferSize);

recorder.startRecording();

Please have a look at http://www.androiddevblog.net/android/android-audio-recording-part-2

Durairaj Packirisamy
  • 4,635
  • 1
  • 21
  • 27