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

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

Merge "Deprecate AudioRecord::getInput() and AudioTrack::getOutput()"

parents 32db812d 32860f77
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -315,7 +315,12 @@ public:
     * Returned value:
     *  handle on audio hardware input
     */
            audio_io_handle_t    getInput() const;
// FIXME The only known public caller is frameworks/opt/net/voip/src/jni/rtp/AudioGroup.cpp
            audio_io_handle_t    getInput() const __attribute__((__deprecated__))
                                                { return getInputPrivate(); }
private:
            audio_io_handle_t    getInputPrivate() const;
public:

    /* Returns the audio session ID associated with this AudioRecord.
     *
+2 −0
Original line number Diff line number Diff line
@@ -465,7 +465,9 @@ public:
     *  handle on audio hardware output, or AUDIO_IO_HANDLE_NONE if the
     *  track needed to be re-created but that failed
     */
private:
            audio_io_handle_t    getOutput() const;
public:

    /* Returns the unique session ID associated with this track.
     *
+2 −2
Original line number Diff line number Diff line
@@ -416,7 +416,7 @@ status_t AudioRecord::getPosition(uint32_t *position) const
uint32_t AudioRecord::getInputFramesLost() const
{
    // no need to check mActive, because if inactive this will return 0, which is what we want
    return AudioSystem::getInputFramesLost(getInput());
    return AudioSystem::getInputFramesLost(getInputPrivate());
}

// -------------------------------------------------------------------------
@@ -712,7 +712,7 @@ void AudioRecord::releaseBuffer(Buffer* audioBuffer)
    // the server does not automatically disable recorder on overrun, so no need to restart
}

audio_io_handle_t AudioRecord::getInput() const
audio_io_handle_t AudioRecord::getInputPrivate() const
{
    AutoMutex lock(mLock);
    return mInput;