Offset direct/offload timestamps by downstream latency

Test: A/V sync of direct/offload DD+ non HW A/V sync playback thread
      through MSD, and MSD -> Audio HAL patch in DD+ non HW A/V sync
      mode.
Change-Id: I244e9fda9741fe9a9ea913f39901654ebefb973c
(cherry picked from commit 8729c2eb3eabda3f6b6985a113bd2022b5b379c9)
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 61f7baf..49fc234 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -1082,6 +1082,8 @@
     static const size_t     kFastMixerLogSize = 8 * 1024;
     sp<NBLog::Writer>       mFastMixerNBLogWriter;
 
+    // Downstream patch latency, available if mDownstreamLatencyStatMs.getN() > 0.
+    audio_utils::Statistics<double> mDownstreamLatencyStatMs{0.999};
 
 public:
     virtual     bool        hasFastMixer() const = 0;