0

I am using simple MediaPlayer to stream a radio streaming..

try {
     MediaPlayer media = new MediaPlayer();
     media.setAudioStreamType(AudioManager.USE_DEFAULT_STREAM_TYPE);
     media.setDataSource("http://indiespectrum.com:9000");
     media.prepareAsync();
     media.start();
   }        
catch(Exception e)
  {
   //Getting Exception
  }

This works fine but the audio played is somewhat slow then the original audio streamed i.e if a song is originally at 2:15 the mediaplayer is playing at 2:05 .There is around 10 sec difference .Why is there a difference and what can be done to remove this?

Ronak Mehta
  • 5,971
  • 5
  • 42
  • 69
Navdroid
  • 1,541
  • 3
  • 25
  • 52
  • Sounds like you have a 48kHz stream that you are playing back at 44.1kHz. Your sample rate is probably wrong. – Brad Apr 23 '13 at 14:44
  • How could I change it?? – Navdroid Apr 23 '13 at 19:38
  • Who knows. You haven't provided any information on what you are using to encode this stream. Please provide more background on the problem. Also, when you say it sounds somewhat slow, the pitch is lower as well? – Brad Apr 23 '13 at 19:40

0 Answers0