summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-04-16 03:07:43 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-04-16 03:07:43 +0000
commitfdb72b9aab9d47446eebf9db3f0f36854549e715 (patch)
tree36ab96129eb2414b05ee6c2ee12e002dc071f037
parent6ae9a1248d88a480e0c3ebb332ae653c3a4aeed0 (diff)
parent71832e785ca8a596907f627635331553c9c2d721 (diff)
downloadlibhardware-fdb72b9aab9d47446eebf9db3f0f36854549e715.tar.gz
Snap for 5472349 from 71832e785ca8a596907f627635331553c9c2d721 to qt-release
Change-Id: Ia007f62960f16e7e15a498babaeaa6ba9115dc14
-rw-r--r--modules/audio_remote_submix/audio_hw.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 6fac56f0..833c12bb 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -805,6 +805,11 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
// the pipe has already been shutdown, this buffer will be lost but we must
// simulate timing so we don't drain the output faster than realtime
usleep(frames * 1000000 / out_get_sample_rate(&stream->common));
+
+ pthread_mutex_lock(&rsxadev->lock);
+ out->frames_written += frames;
+ out->frames_written_since_standby += frames;
+ pthread_mutex_unlock(&rsxadev->lock);
return bytes;
}
} else {