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

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

Merge "Remove streamType parameter from AudioSystem::getLatency()"

parents f7f21b93 241618f1
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ public:
    // returns the audio output stream latency in ms. Corresponds to
    // audio_stream_out->get_latency()
    static status_t getLatency(audio_io_handle_t output,
                               audio_stream_type_t stream,
                               uint32_t* latency);

    static bool routedToA2dpOutput(audio_stream_type_t streamType);
+2 −3
Original line number Diff line number Diff line
@@ -333,11 +333,10 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, audio_stream_type_t st
        return PERMISSION_DENIED;
    }

    return getLatency(output, streamType, latency);
    return getLatency(output, latency);
}

status_t AudioSystem::getLatency(audio_io_handle_t output,
                                 audio_stream_type_t streamType __unused,
                                 uint32_t* latency)
{
    OutputDescriptor *outputDesc;
@@ -354,7 +353,7 @@ status_t AudioSystem::getLatency(audio_io_handle_t output,
        gLock.unlock();
    }

    ALOGV("getLatency() streamType %d, output %d, latency %d", streamType, output, *latency);
    ALOGV("getLatency() output %d, latency %d", output, *latency);

    return NO_ERROR;
}
+1 −1
Original line number Diff line number Diff line
@@ -868,7 +868,7 @@ status_t AudioTrack::createTrack_l(size_t epoch)
    // Not all of these values are needed under all conditions, but it is easier to get them all

    uint32_t afLatency;
    status = AudioSystem::getLatency(output, mStreamType, &afLatency);
    status = AudioSystem::getLatency(output, &afLatency);
    if (status != NO_ERROR) {
        ALOGE("getLatency(%d) failed status %d", output, status);
        goto release;