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

Commit 0c57461f authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Miscellaneous cleanup" into jb-mr2-dev

parents 10774e14 a265845e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ status_t AudioRecord::getMinFrameCount(
    *frameCount = 0;

    size_t size = 0;
    if (AudioSystem::getInputBufferSize(sampleRate, format, channelMask, &size)
            != NO_ERROR) {
        ALOGE("AudioSystem could not query the input buffer size.");
    status_t status = AudioSystem::getInputBufferSize(sampleRate, format, channelMask, &size);
    if (status != NO_ERROR) {
        ALOGE("AudioSystem could not query the input buffer size; status %d", status);
        return NO_INIT;
    }

+2 −2
Original line number Diff line number Diff line
@@ -464,7 +464,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
        PlaybackThread *thread = checkPlaybackThread_l(output);
        PlaybackThread *effectThread = NULL;
        if (thread == NULL) {
            ALOGE("unknown output thread");
            ALOGE("no playback thread found for output handle %d", output);
            lStatus = BAD_VALUE;
            goto Exit;
        }
@@ -589,7 +589,7 @@ uint32_t AudioFlinger::latency(audio_io_handle_t output) const
    Mutex::Autolock _l(mLock);
    PlaybackThread *thread = checkPlaybackThread_l(output);
    if (thread == NULL) {
        ALOGW("latency() unknown thread %d", output);
        ALOGW("latency(): no playback thread found for output handle %d", output);
        return 0;
    }
    return thread->latency();
+3 −3
Original line number Diff line number Diff line
@@ -388,9 +388,9 @@ bool FastMixer::threadLoop()
                if (ATRACE_ENABLED()) {
                    // I wish we had formatted trace names
                    char traceName[16];
                    strcpy(traceName, "framesReady");
                    traceName[11] = i + (i < 10 ? '0' : 'A' - 10);
                    traceName[12] = '\0';
                    strcpy(traceName, "fRdy");
                    traceName[4] = i + (i < 10 ? '0' : 'A' - 10);
                    traceName[5] = '\0';
                    ATRACE_INT(traceName, framesReady);
                }
                FastTrackDump *ftDump = &dumpState->mTracks[i];
+3 −9
Original line number Diff line number Diff line
@@ -77,15 +77,9 @@ protected:

    virtual size_t framesReady() const;

    bool isPausing() const {
        return mState == PAUSING;
    }
    bool isPaused() const {
        return mState == PAUSED;
    }
    bool isResuming() const {
        return mState == RESUMING;
    }
    bool isPausing() const { return mState == PAUSING; }
    bool isPaused() const { return mState == PAUSED; }
    bool isResuming() const { return mState == RESUMING; }
    bool isReady() const;
    void setPaused() { mState = PAUSED; }
    void reset();
+3 −2
Original line number Diff line number Diff line
@@ -2795,7 +2795,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
                // No buffers for this track. Give it a few chances to
                // fill a buffer, then remove it from active list.
                if (--(track->mRetryCount) <= 0) {
                    ALOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", name, this);
                    ALOGI("BUFFER TIMEOUT: remove(%d) from active list on thread %p", name, this);
                    tracksToRemove->add(track);
                    // indicate to client process that the track was disabled because of underrun;
                    // it will then automatically call start() when data is available
@@ -3725,7 +3725,8 @@ bool AudioFlinger::RecordThread::threadLoop()
                                readInto = mRsmpInBuffer;
                                mRsmpInIndex = 0;
                            }
                            mBytesRead = mInput->stream->read(mInput->stream, readInto, mInputBytes);
                            mBytesRead = mInput->stream->read(mInput->stream, readInto,
                                    mInputBytes);
                            if (mBytesRead <= 0) {
                                if ((mBytesRead < 0) && (mActiveTrack->mState == TrackBase::ACTIVE))
                                {
Loading