summaryrefslogtreecommitdiff
path: root/audio/device_port_source.h
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2020-07-15 11:21:05 -0700
committerRoman Kiryanov <rkir@google.com>2020-07-15 15:54:08 -0700
commita62402c743d61c20cb88244011802a83e14e6354 (patch)
treed6c6737342fb01d73a218a805d8cf27588a4e8c0 /audio/device_port_source.h
parentb7539ca4ed9465c0c96409550ab4d140641c929b (diff)
downloadgoldfish-a62402c743d61c20cb88244011802a83e14e6354.tar.gz
Fix getCapturePosition
We want to preserve the frame counter between the standby() calls. Bug: 161361625 Test: atest android.media.cts.AudioRecordTest Change-Id: I159a4c7bd25ce2140799dc36eb54154fa2441870 Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'audio/device_port_source.h')
-rw-r--r--audio/device_port_source.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/device_port_source.h b/audio/device_port_source.h
index 19ed3726..3cc39ffe 100644
--- a/audio/device_port_source.h
+++ b/audio/device_port_source.h
@@ -30,12 +30,13 @@ using namespace ::android::hardware::audio::V6_0;
struct DevicePortSource {
virtual ~DevicePortSource() {}
- virtual Result getCapturePosition(uint64_t &frames, uint64_t &time) const = 0;
+ virtual Result getCapturePosition(uint64_t &frames, uint64_t &time) = 0;
virtual int read(void *data, size_t nBytes) = 0;
static std::unique_ptr<DevicePortSource> create(const DeviceAddress &,
const AudioConfig &,
- const hidl_bitfield<AudioOutputFlag> &);
+ const hidl_bitfield<AudioOutputFlag> &,
+ uint64_t &frames);
};
} // namespace implementation