From 980a50c7853059caf68b475ae8637dc35f199f82 Mon Sep 17 00:00:00 2001 From: "xians@chromium.org" Date: Tue, 4 Oct 2011 22:38:30 +0000 Subject: Adding delay estimation to input audio. On linux, snd_pcm_delay API will be used to get the delay value from ALSA; On mac, the AudioQueue implementation will just use the buffer size as delay value since we may not use this impl for recording; the low-latency AudioUnits implementation will use some AudioUnitGetProperty() API to get the accurate delay value from the driver; On windows, for the Wave implementation, based on the tests we do, it should be OK to use the buffer size as the delay value; for the to-be-implemented core audio implementation, we will see what is the appropriate way to get the delay there. Review URL: http://codereview.chromium.org/8068005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104002 0039d316-1c4b-4281-b951-d872f2087c98 --- media/audio/mac/audio_input_mac.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'media/audio/mac') diff --git a/media/audio/mac/audio_input_mac.cc b/media/audio/mac/audio_input_mac.cc index 3efe86c..e96277f 100644 --- a/media/audio/mac/audio_input_mac.cc +++ b/media/audio/mac/audio_input_mac.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -159,6 +159,7 @@ void PCMQueueInAudioInputStream::HandleInputBuffer( if (audio_buffer->mAudioDataByteSize) callback_->OnData(this, reinterpret_cast(audio_buffer->mAudioData), + audio_buffer->mAudioDataByteSize, audio_buffer->mAudioDataByteSize); // Recycle the buffer. OSStatus err = QueueNextBuffer(audio_buffer); -- cgit v1.1