code: public void setChannel(final int channelConfig){
          if(channelConfig != AudioFormat.CHANNEL_IN_MONO && channelConfig !=AudioFormat.CHANNEL_IN_STEREO && channelConfig != AudioFormat.CHANNEL_IN_DEFAULT){
              throw new IllegalArgumentException("Invalid channel given.");
          }
          else if (currentAudioState.get()!=PREPARED_STATE && currentAudioState.get()!=INITIALIZED_STATE ){
              throw new IllegalStateException("Recorder cannot have its file changed when it is in an initialized or prepared state");
          }
          this.channelConfig=channelConfig;
      }
docs: Sets the channel.
  @param channelConfig {@link AudioFormat}.CHANNEL_IN_MONO, {@link AudioFormat}.CHANNEL_IN_DEFAULT, or {@link AudioFormat}.CHANNEL_IN_STEREO
  @throws IllegalArgumentException if it is not Mono or Stereo.
  @throws IllegalStateException If the channel is changed when it is not in a prepared or initialized state.