Add AudioFlinger::PlaybackThread::Track::getTimestamp()
with a dummy implementation initially,
and use it in AudioFlinger::TrackHandle::getTimestamp()
Change-Id: I2da88fc52a135a7f0d9fd9538986e919dc8ccd3b
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index d1ab3c8..687217b 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -285,7 +285,7 @@
status_t AudioFlinger::TrackHandle::getTimestamp(AudioTimestamp& timestamp)
{
- return INVALID_OPERATION;
+ return mTrack->getTimestamp(timestamp);
}
status_t AudioFlinger::TrackHandle::onTransact(
@@ -716,6 +716,17 @@
}
}
+status_t AudioFlinger::PlaybackThread::Track::getTimestamp(AudioTimestamp& timestamp)
+{
+ sp<ThreadBase> thread = mThread.promote();
+ if (thread == 0) {
+ return false;
+ }
+ Mutex::Autolock _l(thread->mLock);
+ PlaybackThread *playbackThread = (PlaybackThread *)thread.get();
+ return INVALID_OPERATION;
+}
+
status_t AudioFlinger::PlaybackThread::Track::attachAuxEffect(int EffectId)
{
status_t status = DEAD_OBJECT;