| Index: media/base/android/java/src/org/chromium/media/AudioRecordInput.java
|
| diff --git a/media/base/android/java/src/org/chromium/media/AudioRecordInput.java b/media/base/android/java/src/org/chromium/media/AudioRecordInput.java
|
| index 89d694a92ed3a38029f8bfe03240a65b96523112..e69f8a150e6d218d921d236725ae3227737b18db 100644
|
| --- a/media/base/android/java/src/org/chromium/media/AudioRecordInput.java
|
| +++ b/media/base/android/java/src/org/chromium/media/AudioRecordInput.java
|
| @@ -35,7 +35,6 @@ class AudioRecordInput {
|
| private final int mSampleRate;
|
| private final int mChannels;
|
| private final int mBitsPerSample;
|
| - private final int mHardwareDelayBytes;
|
| private final boolean mUsePlatformAEC;
|
| private ByteBuffer mBuffer;
|
| private AudioRecord mAudioRecord;
|
| @@ -62,8 +61,7 @@ class AudioRecordInput {
|
| while (mKeepAlive) {
|
| int bytesRead = mAudioRecord.read(mBuffer, mBuffer.capacity());
|
| if (bytesRead > 0) {
|
| - nativeOnData(mNativeAudioRecordInputStream, bytesRead,
|
| - mHardwareDelayBytes);
|
| + nativeOnData(mNativeAudioRecordInputStream, bytesRead, HARDWARE_DELAY_MS);
|
| } else {
|
| Log.e(TAG, "read failed: %d", bytesRead);
|
| if (bytesRead == AudioRecord.ERROR_INVALID_OPERATION) {
|
| @@ -107,7 +105,6 @@ class AudioRecordInput {
|
| mSampleRate = sampleRate;
|
| mChannels = channels;
|
| mBitsPerSample = bitsPerSample;
|
| - mHardwareDelayBytes = HARDWARE_DELAY_MS * sampleRate / 1000 * bitsPerSample / 8;
|
| mUsePlatformAEC = usePlatformAEC;
|
|
|
| // We use a direct buffer so that the native class can have access to
|
| @@ -243,6 +240,6 @@ class AudioRecordInput {
|
|
|
| private native void nativeCacheDirectBufferAddress(long nativeAudioRecordInputStream,
|
| ByteBuffer buffer);
|
| - private native void nativeOnData(long nativeAudioRecordInputStream, int size,
|
| - int hardwareDelayBytes);
|
| + private native void nativeOnData(
|
| + long nativeAudioRecordInputStream, int size, int hardwareDelayMs);
|
| }
|
|
|