From 4c015204704f9b95a5840ce7df11b62d34334f96 Mon Sep 17 00:00:00 2001 From: Andy Hung Date: Mon, 11 Apr 2016 17:54:30 -0700 Subject: [PATCH] Rename AudioRecord.getTimestamp parameter from timestamp to outTimestamp Bug: 27952053 Change-Id: I2940de5ef1a67ec9a2ad8e294149243679f7324a --- media/java/android/media/AudioRecord.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index ca306cc7127cd..53e7a4dc7d11f 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -874,22 +874,24 @@ public class AudioRecord implements AudioRouting * Calling {@link #startRecording()} following a {@link #stop()} will reset * the frame count to 0. * - * @param timestamp a reference to a non-null AudioTimestamp instance. + * @param outTimestamp a caller provided non-null AudioTimestamp instance, + * which is updated with the AudioRecord frame delivery information upon success. * @param timebase one of * {@link AudioTimestamp#TIMEBASE_BOOTTIME AudioTimestamp.TIMEBASE_BOOTTIME} or - * {@link AudioTimestamp#TIMEBASE_MONOTONIC AudioTimestamp.TIMEBASE_MONOTONIC}. + * {@link AudioTimestamp#TIMEBASE_MONOTONIC AudioTimestamp.TIMEBASE_MONOTONIC}, + * used to select the clock for the AudioTimestamp time. * @return {@link #SUCCESS} if a timestamp is available, * or {@link #ERROR_INVALID_OPERATION} if a timestamp not available. */ - public int getTimestamp(@NonNull AudioTimestamp timestamp, + public int getTimestamp(@NonNull AudioTimestamp outTimestamp, @AudioTimestamp.Timebase int timebase) { - if (timestamp == null || + if (outTimestamp == null || (timebase != AudioTimestamp.TIMEBASE_BOOTTIME && timebase != AudioTimestamp.TIMEBASE_MONOTONIC)) { throw new IllegalArgumentException(); } - return native_get_timestamp(timestamp, timebase); + return native_get_timestamp(outTimestamp, timebase); } /** @@ -1793,7 +1795,7 @@ public class AudioRecord implements AudioRouting private native final void native_enableDeviceCallback(); private native final void native_disableDeviceCallback(); - private native final int native_get_timestamp(@NonNull AudioTimestamp timestamp, + private native final int native_get_timestamp(@NonNull AudioTimestamp outTimestamp, @AudioTimestamp.Timebase int timebase); //---------------------------------------------------------