Do you using alsa_sound for recording & playback?

On Fri, May 1, 2009 at 11:00 PM, Scott Slaugh <xsla...@gmail.com> wrote:

>
> Hi,
>
> I have an application that I developed using the Android 1.1 SDK that
> I am trying to port to Android 1.5.  In my application, I record a
> sound through the microphone and then do various things with it,
> including playing it back using a MediaPlayer object.  My code works
> fine when I use the 1.1 target, but when I use a 1.5 target I get this
> error when setting up the player:
>
> Command PLAYER_SET_DATA_SOURCE completed with an error or info
> PVMFErrNotSupported
> error (1, -4)
> Couldn't setup MediaPlayer
> java.io.IOException: Prepare failed.: status=0x1
>   at android.media.MediaPlayer.prepare(Native Method)
>   at org.byu.chum.AudioUtils.AudioRecording.stopRecording
> (AudioRecording.java:92)
>   at org.byu.chum.SoundRecorder.Recorder$StopListener.onClick
> (Recorder.java:198)
>   ...
>
> It seems like Android isn't liking the format of my media, but I don't
> know why, since I just recorded that very format on the Android
> device.  Here's the code that is throwing the error:
>
>  player = new MediaPlayer();
>                 try {
>                         player.setDataSource(recordFile.toString());
>                         player.prepare();
>                 }
>                 catch (IOException e) {
>                         Log.e("playRecording", "Couldn't setup
> MediaPlayer", e);
>                 }
>
> Has anyone seen this or does anybody have any ideas on what might be
> causing this problem?
>
> Thanks!
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to