AudioTrack: fix head position after restore
The head position transfered to the new track
by restoreTrack_l() must take into account the frames that
are dropped from the old track to avoid a non recoverable
offset in the playback head position returned to applications.
Bug: 11230062.
Change-Id: I51143a08b95e8f264ed709ae2054360315f2b8b1
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index fe258ad..395f164 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -256,6 +256,8 @@
return mEpoch;
}
+ size_t getFramesFilled();
+
private:
size_t mEpoch;
};