title: Smoothly increase progress bar while playing audio file
body: <p>I am playing audio file of different sizes in my application and while audio is playing the progress bar should progress smoothly but progress bar is taking random size steps.</p>
  
  <p>I am using following code :</p>
  
  <pre><code> mp = new MediaPlayer(); 
   mp.setDataSource("audio file path");
   mp.prepare();
   mp.start();
   pb.setMax(mp.getDuration());
              new AsyncTask&lt;Void, Integer, Void&gt;() {
                  @Override
                  protected Void doInBackground(Void... params) {
                      while(mp.isPlaying())
                      {
                       publishProgress(mp.getCurrentPosition);
                      }
                      return null;
                  }
                   protected void onProgressUpdate(Integer... progress) {
                       pb.setProgress(progress[0]);
                   }
                  @Override
                  protected void onPostExecute(Void result) {
                      super.onPostExecute(result);
                      mp.stop();
                      mp.release();
                  }
              }.execute();
  </code></pre>
  
  <p>Is there any way to smoothly increase progressbar?</p>