It will be good if audio recording is to JSpeex (from xiph) -
compression is as good as mp3 and is free and suited to voice
applications.
thanks,
Anil
On Mar 12, 1:02 pm, Digit <[EMAIL PROTECTED]> wrote:
> for the record, audio record is not supported in the M5 emulator.
>
> On Wed, Mar 12, 2008 at 6:37 PM, cirion <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > Has anyone successfully managed to record audio using M5? I'm using
> > the following code, and don't receive any exceptions, but the recorded
> > file does not show up on the filesystem. There isn't any interesting
> > information in logcat.
>
> > private final Handler mStateChanger = new Handler(){
> > @Override
> > public void handleMessage(Message msg) {
> > switch (msg.what) {
> > case STATE_DONE:
> > stop();
> > mText.setText("Complete.");
> > break;
> > }
> > }
> > };
>
> > private void start()
> > {
> > mRecorder = new MediaRecorder();
>
> > mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
> > mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
> > mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
> > mRecorder.setOutputFile("/data/data/test/test.raw");
>
> > mRecorder.start();
>
> > Message m = Message.obtain();
> > m.what = STATE_DONE;
> > mStateChanger.sendMessageDelayed(m, 10000);
> > }
>
> > private void stop()
> > {
> > mRecorder.stop();
> > mRecorder.release();
> > }
>
> > The documentation at
> >http://code.google.com/android/toolbox/apis/media.html
> > seems to be out of date - in particular, getDataFilePath is
> > emphatically deprecated. If anyone has sample code for how to record
> > properly on M5, I'd really appreciate seeing it!
>
> > Thanks,
> > Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---