AudioPlaybackCapture: solve second output data consumed low issue

PatchRecord is in the output thread of audiohal. Every time the track
is consumed by the mixer and the ReleaseBuffer is executed, the data
obtainBuffer is written into the PatchBuffer. When a third-party application
uses AudioTrack::setPlaybackRate to timestretch the audio data, PatchRecord
and PatchTrack need to update framecount and speed at the same time. And the
remotesubmix thread where PatchTrack is located needs to perform timestretch
processing synchronously to solve the problem of Track::interceptBuffer
dropping frames.

Test: atest AudioPlaybackCaptureTest
Bug: 345666452

Change-Id: I39962c754426485d5bd60be21eceba11a171abd6
Signed-off-by: guonaichao <guonaichao@xiaomi.com>
diff --git a/services/audioflinger/IAfTrack.h b/services/audioflinger/IAfTrack.h
index 2302e13..0d8c01e 100644
--- a/services/audioflinger/IAfTrack.h
+++ b/services/audioflinger/IAfTrack.h
@@ -571,10 +571,11 @@
             size_t bufferSize,
             audio_output_flags_t flags,
             const Timeout& timeout = {},
-            size_t frameCountToBeReady = 1 /** Default behaviour is to start
+            size_t frameCountToBeReady = 1, /** Default behaviour is to start
                                              *  as soon as possible to have
                                              *  the lowest possible latency
-                                             *  even if it might glitch. */);
+                                             *  even if it might glitch. */
+            float speed = 1.0f);
 };
 
 class IAfPatchRecord : public virtual IAfRecordTrack, public virtual IAfPatchTrackBase {