summaryrefslogtreecommitdiffstats
path: root/media/audio/mac
diff options
context:
space:
mode:
authorxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 22:38:30 +0000
committerxians@chromium.org <xians@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 22:38:30 +0000
commit980a50c7853059caf68b475ae8637dc35f199f82 (patch)
tree426f5fe68780a407d247a2cd4fb22ae737f38c14 /media/audio/mac
parent19005b7e8f675a339af6327563fd72775ae592f7 (diff)
downloadchromium_src-980a50c7853059caf68b475ae8637dc35f199f82.zip
chromium_src-980a50c7853059caf68b475ae8637dc35f199f82.tar.gz
chromium_src-980a50c7853059caf68b475ae8637dc35f199f82.tar.bz2
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
Diffstat (limited to 'media/audio/mac')
-rw-r--r--media/audio/mac/audio_input_mac.cc3
1 files changed, 2 insertions, 1 deletions
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<const uint8*>(audio_buffer->mAudioData),
+ audio_buffer->mAudioDataByteSize,
audio_buffer->mAudioDataByteSize);
// Recycle the buffer.
OSStatus err = QueueNextBuffer(audio_buffer);