The MediaPlayer doesn't support streaming at all. You can get away
with a "pseudo-streamed" MP3 because the MP3 format was intended to be
broadcast and the MP3 parser is a bit more forgiving about it than the
other parsers.

On Dec 23, 4:21 am, "Aldo Neto" <tumo...@gmail.com> wrote:
> Hi,
>   I developed a quite simple code for audio streaming with MediaPlayer
> (please see code below). I tested it with an MP3 file and it worked
> perfectly. However, when I tested the same code with a WAV audio, the
> MediaPlayer was unable to stream the audio properly.
>
>    I had to build a StreamPlayer based 
> onhttp://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-stream...
>
>    I don't know if this a known issue that I'm not aware, but does anybody
> knows why the code below wouldn't work with WAV files? Does MediaPlayer
> library supports WAV streaming?
>
> Thanks
>
>       final ProgressBar progressBar = (ProgressBar)
> findViewById(R.id.progress_bar);
>       player = new MediaPlayer();
>       player.setDataSource(path);
>       player.setAudioStreamType(AudioManager.STREAM_MUSIC);
>       player.prepareAsync();
>       player.setOnPreparedListener(new OnPreparedListener(){
>
>         @Override
>         public void onPrepared(MediaPlayer mp)
>         {
>           //Preparation finished. Start playing voicemail
>           player.start();
>
>           //Update primary progress on Progress bar
>           startPlayProgressUpdater();
>         }
>       });
>
>       player.setOnBufferingUpdateListener(new OnBufferingUpdateListener()
>       {
>
>         @Override
>         public void onBufferingUpdate(MediaPlayer mp, int percent)
>         {
>           //Update secondary progress on Progress bar
>           progressBar.setSecondaryProgress(percent);
>         }
>       });
--~--~---------~--~----~------------~-------~--~----~
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