public void playStream(InputStream stream){
  try {
    byte[] data=convertStreamToByteArray(stream);
    if (data.length > 28) {
      sampleRate=readInt(data,24);
    }
    int headSize=44, metaDataSize=48;
    int destPos=headSize + metaDataSize;
    int rawLength=data.length - destPos;
    byte[] d=new byte[rawLength];
    System.arraycopy(data,destPos,d,0,rawLength);
    initPlayer();
    audioTrack.write(d,0,d.length);
    stream.close();
    if (audioTrack != null && audioTrack.getState() != AudioTrack.STATE_UNINITIALIZED) {
      audioTrack.release();
    }
  }
 catch (  IOException e2) {
    Log.e(TAG,e2.getMessage());
  }
}

public void playStream ( InputStream stream ) { try { byte [ ] data = convertStreamToByteArray ( stream ) ; if ( data . length > 28 ) { sampleRate = readInt ( data , 24 ) ; } int headSize = 44 , metaDataSize = 48 ; int destPos = headSize + metaDataSize ; int rawLength = data . length - destPos ; byte [ ] d = new byte [ rawLength ] ; System . arraycopy ( data , destPos , d , 0 , rawLength ) ; initPlayer ( ) ; audioTrack . write ( d , 0 , d . length ) ; stream . close ( ) ; if ( audioTrack != null && audioTrack . getState ( ) != AudioTrack . STATE_UNINITIALIZED ) { audioTrack . release ( ) ; } } catch ( IOException e2 ) { Log . e ( TAG , e2 . getMessage ( ) ) ; } }
play the given inputstream
