code: public void setMaxTimeInMillis(final long maxTimeInMillis){
          if (maxTimeInMillis<1000 || maxTimeInMillis>PcmWavConverter.MAX_TIME_WAV_FILE_MILLIS){
              throw new IllegalArgumentException("Invalid max time given");
          }
          else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!=INITIALIZED_STATE ){
              throw new IllegalStateException("Cannot modify maxTimeInMillis during a non-prepared and non-initialized state");
          }
          this.maxTimeInMillis=maxTimeInMillis;
          this.remainingMaxTimeInMillis=maxTimeInMillis;
      }
docs: Sets the maxmimum time the recording should last. Default value is {@link PcmWavConverter}.MAX_TIME_WAV_FILE_MILLIS
  @param maxTimeInMillis Sets the maximum time a recording should last. Must be greater than or equal to 1000 and less than or equal to {@link PcmWavConverter}.MAX_TIME_WAV_FILE_MILLIS