summaryrefslogtreecommitdiffstats
path: root/audio/audio_hw_hal.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@google.com>2012-03-21 17:43:54 -0700
committerMike Lockwood <lockwood@google.com>2012-03-21 17:44:01 -0700
commit584c285492a04c711c6339720c6f9bc84895201b (patch)
tree6eed7e1b44b9b81c508716fabf4f4b446472bcb9 /audio/audio_hw_hal.cpp
parent0b934ade258294987f8bde9cd338d7b635522719 (diff)
parent5b71e6fd76fe244719cb5a3f9ac24572acd9a3ca (diff)
downloadhardware_libhardware_legacy-584c285492a04c711c6339720c6f9bc84895201b.zip
hardware_libhardware_legacy-584c285492a04c711c6339720c6f9bc84895201b.tar.gz
hardware_libhardware_legacy-584c285492a04c711c6339720c6f9bc84895201b.tar.bz2
Merge commit '5b71e6f'
Add an implementation of get_next_write_timestamp. Change-Id: Ie8e19307bafdb057d06bf3c536380c5740f830a6
Diffstat (limited to 'audio/audio_hw_hal.cpp')
-rw-r--r--audio/audio_hw_hal.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/audio/audio_hw_hal.cpp b/audio/audio_hw_hal.cpp
index dd66f76..0fc4efa 100644
--- a/audio/audio_hw_hal.cpp
+++ b/audio/audio_hw_hal.cpp
@@ -163,6 +163,14 @@ static int out_get_render_position(const struct audio_stream_out *stream,
return out->legacy_out->getRenderPosition(dsp_frames);
}
+static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
+ int64_t *timestamp)
+{
+ const struct legacy_stream_out *out =
+ reinterpret_cast<const struct legacy_stream_out *>(stream);
+ return out->legacy_out->getNextWriteTimestamp(timestamp);
+}
+
static int out_add_audio_effect(const struct audio_stream *stream, effect_handle_t effect)
{
return 0;
@@ -436,6 +444,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
out->stream.set_volume = out_set_volume;
out->stream.write = out_write;
out->stream.get_render_position = out_get_render_position;
+ out->stream.get_next_write_timestamp = out_get_next_write_timestamp;
*stream_out = &out->stream;
return 0;