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

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

Merge "Document AudioTrack mFrameCount and mReqFrameCount better"

parents dbed8955 396fabdb
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -664,9 +664,10 @@ protected:
    float                   mVolume[2];
    float                   mSendLevel;
    mutable uint32_t        mSampleRate;            // mutable because getSampleRate() can update it.
    size_t                  mFrameCount;            // corresponds to current IAudioTrack
    size_t                  mReqFrameCount;         // frame count to request the next time a new
                                                    // IAudioTrack is needed
    size_t                  mFrameCount;            // corresponds to current IAudioTrack, value is
                                                    // reported back by AudioFlinger to the client
    size_t                  mReqFrameCount;         // frame count to request the first or next time
                                                    // a new IAudioTrack is needed, non-decreasing

    // constant after constructor or set()
    audio_format_t          mFormat;                // as requested by client, not forced to 16-bit
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ status_t AudioTrack::set(
    mVolume[LEFT] = 1.0f;
    mVolume[RIGHT] = 1.0f;
    mSendLevel = 0.0f;
    mFrameCount = frameCount;
    // mFrameCount is initialized in createTrack_l
    mReqFrameCount = frameCount;
    mNotificationFramesReq = notificationFrames;
    mNotificationFramesAct = 0;