diff options
author | John Grossman <johngro@google.com> | 2011-08-29 10:56:08 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-10-27 17:35:47 -0400 |
commit | 5b71e6fd76fe244719cb5a3f9ac24572acd9a3ca (patch) | |
tree | dd5037d1baa012ac981b89a2a9a900f933edf960 /audio/AudioHardwareInterface.cpp | |
parent | 617c80a82e5620b2f16348e4bd3d7fc3b76e9021 (diff) | |
download | hardware_libhardware_legacy-5b71e6fd76fe244719cb5a3f9ac24572acd9a3ca.zip hardware_libhardware_legacy-5b71e6fd76fe244719cb5a3f9ac24572acd9a3ca.tar.gz hardware_libhardware_legacy-5b71e6fd76fe244719cb5a3f9ac24572acd9a3ca.tar.bz2 |
Add an implementation of get_next_write_timestamp.
Add a default implementation of get_next_write_timestamp to the C <--> C++
legacy audio HAL implementation allowing HALs using the legacy C++
AudioStreamOut to overload and implement get_next_write_timestamp. Default
implementation returns INVALID_OPERATION to indicate that the functionality is
not supported.
Change-Id: I087347649e9ba186a74cb34aaadf989bf90720fe
Diffstat (limited to 'audio/AudioHardwareInterface.cpp')
-rw-r--r-- | audio/AudioHardwareInterface.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/AudioHardwareInterface.cpp b/audio/AudioHardwareInterface.cpp index 4997a6a..c116669 100644 --- a/audio/AudioHardwareInterface.cpp +++ b/audio/AudioHardwareInterface.cpp @@ -73,6 +73,12 @@ AudioStreamOut::~AudioStreamOut() { } +// default implementation is unsupported +status_t AudioStreamOut::getNextWriteTimestamp(int64_t *timestamp) +{ + return INVALID_OPERATION; +} + AudioStreamIn::~AudioStreamIn() {} AudioHardwareBase::AudioHardwareBase() @@ -125,6 +131,7 @@ size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int format, in return 320; } +// default implementation is unsupported status_t AudioHardwareBase::getMasterVolume(float *volume) { return INVALID_OPERATION; |