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

Commit 44c71a9d authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Linux Build Service Account
Browse files

libmedia: Increase offload shared buffer size

Ensure that AudioTrack and OffloadThread share at least twice fragment
size worth of buffer space. This helps avoid failure to restart
on an underrun

Change-Id: I4dd9e5e5a7c8aebb34b13f2e6626b73adc2ba557
parent cf1782db
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1053,7 +1053,8 @@ status_t AudioTrack::createTrack_l()
            // Same comment as below about ignoring frameCount parameter for set()
            frameCount = mSharedBuffer->size();
        } else if (frameCount == 0) {
            frameCount = afFrameCount;
            frameCount = afFrameCount * 2;
            ALOGV("Offload: new frameCount = %d", frameCount);
        }
        if (mNotificationFramesAct != frameCount) {
            mNotificationFramesAct = frameCount;