Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97d50425 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Don't doubly initialize fields in constructor

Change-Id: Id3b4911a7954a5a908764683cc7b8d8515d4482a
parent 474daa2b
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -124,11 +124,11 @@ public class AudioRecord
    /**
    /**
     * The audio data sampling rate in Hz.
     * The audio data sampling rate in Hz.
     */
     */
    private int mSampleRate = 22050;
    private int mSampleRate;
    /**
    /**
     * The number of input audio channels (1 is mono, 2 is stereo)
     * The number of input audio channels (1 is mono, 2 is stereo)
     */
     */
    private int mChannelCount = 1;
    private int mChannelCount;
    /**
    /**
     * The audio channel mask
     * The audio channel mask
     */
     */
@@ -138,11 +138,11 @@ public class AudioRecord
     * @see AudioFormat#ENCODING_PCM_8BIT
     * @see AudioFormat#ENCODING_PCM_8BIT
     * @see AudioFormat#ENCODING_PCM_16BIT
     * @see AudioFormat#ENCODING_PCM_16BIT
     */
     */
    private int mAudioFormat = AudioFormat.ENCODING_PCM_16BIT;
    private int mAudioFormat;
    /**
    /**
     * Where the audio data is recorded from.
     * Where the audio data is recorded from.
     */
     */
    private int mRecordSource = MediaRecorder.AudioSource.DEFAULT;
    private int mRecordSource;
    /**
    /**
     * Indicates the state of the AudioRecord instance.
     * Indicates the state of the AudioRecord instance.
     */
     */
@@ -210,7 +210,6 @@ public class AudioRecord
    public AudioRecord(int audioSource, int sampleRateInHz, int channelConfig, int audioFormat,
    public AudioRecord(int audioSource, int sampleRateInHz, int channelConfig, int audioFormat,
            int bufferSizeInBytes)
            int bufferSizeInBytes)
    throws IllegalArgumentException {
    throws IllegalArgumentException {
        mState = STATE_UNINITIALIZED;
        mRecordingState = RECORDSTATE_STOPPED;
        mRecordingState = RECORDSTATE_STOPPED;


        // remember which looper is associated with the AudioRecord instanciation
        // remember which looper is associated with the AudioRecord instanciation