Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Issue 8234009: Adding input and output delay estimation for mac. (Closed)

Created:
9 years, 2 months ago by no longer working on chromium
Modified:
9 years, 1 month ago
CC:
chromium-reviews, hclam+watch_chromium.org, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, annacc+watch_chromium.org, ajwong+watch_chromium.org, vrk (LEFT CHROMIUM), scherkus (not reviewing)
Visibility:
Public.

Description

Adding input and output delay estimation for mac. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107642

Patch Set 1 : '' #

Total comments: 50

Patch Set 2 : changed the code based on comments && fixed unittest #

Patch Set 3 : increase the delay precision #

Total comments: 9

Patch Set 4 : update #

Total comments: 14

Patch Set 5 : remove the deprecated AudioHardwareGetProperty and update comments #

Total comments: 32

Patch Set 6 : update #

Total comments: 4

Patch Set 7 : change the code based on comment from Chris #

Patch Set 8 : replace deprecated AudioDevice* with AudioObject* & round the latency before converting to bytes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+287 lines, -25 lines) Patch
M media/audio/mac/audio_low_latency_input_mac.h View 1 2 3 4 5 6 4 chunks +20 lines, -1 line 0 comments Download
M media/audio/mac/audio_low_latency_input_mac.cc View 1 2 3 4 5 6 7 5 chunks +117 lines, -13 lines 0 comments Download
M media/audio/mac/audio_low_latency_input_mac_unittest.cc View 1 2 3 4 5 6 3 chunks +6 lines, -2 lines 0 comments Download
M media/audio/mac/audio_low_latency_output_mac.h View 1 2 3 4 5 6 3 chunks +29 lines, -2 lines 0 comments Download
M media/audio/mac/audio_low_latency_output_mac.cc View 1 2 3 4 5 6 7 8 chunks +115 lines, -7 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
no longer working on chromium
Hello, This patch adds the delay estimation to low-latency input/output audio on Mac. Could you ...
9 years, 2 months ago (2011-10-12 10:19:32 UTC) #1
henrika (OOO until Aug 14)
Did initial review of the input part. Main comments applies to output side as well. ...
9 years, 2 months ago (2011-10-12 12:10:11 UTC) #2
no longer working on chromium
Changed the code based on the comments from Henrik, and fixed the unittests. http://codereview.chromium.org/8234009/diff/8001/media/audio/mac/audio_low_latency_input_mac.cc File ...
9 years, 2 months ago (2011-10-12 15:28:47 UTC) #3
Chris Rogers
Hi Henrik, I haven't had a chance to go through in detail, but since the ...
9 years, 2 months ago (2011-10-12 19:59:49 UTC) #4
henrika (OOO until Aug 14)
Chris, it sounds like a good idea to maintain a higher precision all the way ...
9 years, 2 months ago (2011-10-13 06:27:56 UTC) #5
no longer working on chromium
Done with increasing the precision of the delay value.
9 years, 2 months ago (2011-10-13 12:27:51 UTC) #6
scherkus (not reviewing)
http://codereview.chromium.org/8234009/diff/13005/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/13005/media/audio/mac/audio_low_latency_input_mac.cc#newcode223 media/audio/mac/audio_low_latency_input_mac.cc:223: StoreHardwareLatency(); functions that have side effects (i.e., setting the ...
9 years, 2 months ago (2011-10-19 16:35:14 UTC) #7
no longer working on chromium
Please take a new round. http://codereview.chromium.org/8234009/diff/13005/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/13005/media/audio/mac/audio_low_latency_input_mac.cc#newcode223 media/audio/mac/audio_low_latency_input_mac.cc:223: StoreHardwareLatency(); On 2011/10/19 16:35:15, ...
9 years, 2 months ago (2011-10-19 18:19:05 UTC) #8
scherkus (not reviewing)
http://codereview.chromium.org/8234009/diff/24001/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/24001/media/audio/mac/audio_low_latency_input_mac.cc#newcode221 media/audio/mac/audio_low_latency_input_mac.cc:221: // Gets the capture device hardware latency and stores ...
9 years, 2 months ago (2011-10-19 18:23:57 UTC) #9
no longer working on chromium
http://codereview.chromium.org/8234009/diff/24001/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/24001/media/audio/mac/audio_low_latency_input_mac.cc#newcode221 media/audio/mac/audio_low_latency_input_mac.cc:221: // Gets the capture device hardware latency and stores ...
9 years, 2 months ago (2011-10-20 11:25:51 UTC) #10
scherkus (not reviewing)
LGTM w/ nits thanks for the explanations! http://codereview.chromium.org/8234009/diff/19009/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/19009/media/audio/mac/audio_low_latency_input_mac.cc#newcode426 media/audio/mac/audio_low_latency_input_mac.cc:426: // Logs ...
9 years, 2 months ago (2011-10-21 00:20:58 UTC) #11
henrika (OOO until Aug 14)
LGTM with nits. http://codereview.chromium.org/8234009/diff/19009/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/19009/media/audio/mac/audio_low_latency_input_mac.cc#newcode141 media/audio/mac/audio_low_latency_input_mac.cc:141: // First, obtain the current input ...
9 years, 2 months ago (2011-10-21 07:27:22 UTC) #12
no longer working on chromium
Done with the comments from Andrew and Henrik. Chris, any input from you? Thanks, BR, ...
9 years, 2 months ago (2011-10-21 12:21:46 UTC) #13
Chris Rogers
http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc#newcode320 media/audio/mac/audio_low_latency_input_mac.cc:320: (capture_latency_frames * format_.mBytesPerFrame + 0.5); Don't we want to ...
9 years, 1 month ago (2011-10-26 19:03:53 UTC) #14
no longer working on chromium
http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc File media/audio/mac/audio_low_latency_input_mac.cc (right): http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc#newcode320 media/audio/mac/audio_low_latency_input_mac.cc:320: (capture_latency_frames * format_.mBytesPerFrame + 0.5); On 2011/10/26 19:03:53, Chris ...
9 years, 1 month ago (2011-10-26 22:07:23 UTC) #15
Chris Rogers
On 2011/10/26 22:07:23, xians1 wrote: > http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc > File media/audio/mac/audio_low_latency_input_mac.cc (right): > > http://codereview.chromium.org/8234009/diff/29001/media/audio/mac/audio_low_latency_input_mac.cc#newcode320 > ...
9 years, 1 month ago (2011-10-26 22:30:00 UTC) #16
no longer working on chromium
On Wed, Oct 26, 2011 at 3:30 PM, <crogers@google.com> wrote: > On 2011/10/26 22:07:23, xians1 ...
9 years, 1 month ago (2011-10-26 23:55:17 UTC) #17
no longer working on chromium
Rounded the latency in units of frames before converting to bytes. Replaced all the deprecated ...
9 years, 1 month ago (2011-10-27 01:56:22 UTC) #18
henrika (OOO until Aug 14)
Chris, you stated earlier that "could you please store the latency (in ms) as a ...
9 years, 1 month ago (2011-10-27 06:48:15 UTC) #19
no longer working on chromium
On 2011/10/27 06:48:15, henrika1 wrote: > Chris, > > you stated earlier that "could you ...
9 years, 1 month ago (2011-10-27 17:48:31 UTC) #20
Chris Rogers
One millisecond is around 44 sample-frames @44.1KHz, so dealing with ms is only accurate to ...
9 years, 1 month ago (2011-10-27 18:27:41 UTC) #21
Chris Rogers
Shijing, yes that's right. On 2011/10/27 17:48:31, xians1 wrote: > On 2011/10/27 06:48:15, henrika1 wrote: ...
9 years, 1 month ago (2011-10-27 18:34:34 UTC) #22
no longer working on chromium
I am going to commit the CL if no more input from you guys. Thanks, ...
9 years, 1 month ago (2011-10-27 18:36:19 UTC) #23
Chris Rogers
Did you change the rounding? It didn't seem like the change has been made in ...
9 years, 1 month ago (2011-10-27 18:38:40 UTC) #24
no longer working on chromium
On 2011/10/27 18:38:40, Chris Rogers wrote: > Did you change the rounding? It didn't seem ...
9 years, 1 month ago (2011-10-27 18:51:47 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/8234009/36004
9 years, 1 month ago (2011-10-27 21:13:35 UTC) #26
commit-bot: I haz the power
Change committed as 107642
9 years, 1 month ago (2011-10-27 22:46:32 UTC) #27
henrika (OOO until Aug 14)
Shijing, I don't know the full story of why we use bytes as unit for ...
9 years, 1 month ago (2011-10-28 07:09:42 UTC) #28
Chris Rogers
Henrik, do you have any particular argument for providing considerably less precision than the OS-specific ...
9 years, 1 month ago (2011-10-28 17:35:19 UTC) #29
henrika_dont_use
9 years, 1 month ago (2011-10-30 17:46:43 UTC) #30
Let's finalize this discussion off-line.

/Henrik

On Fri, Oct 28, 2011 at 7:35 PM, <crogers@google.com> wrote:

> Henrik, do you have any particular argument for providing considerably less
> precision than the OS-specific APIs provide?  As I mentioned before, 1ms
> is a
> pretty course granularity.  It may be fine for WebRTC, but in the future
> there
> may be other clients for this information.  There's no reason to
> artificially
> quantize it when a higher precision value is available.
>
>
> On 2011/10/28 07:09:42, henrika1 wrote:
>
>> Shijing,
>>
>
>  I don't know the full story of why we use bytes as unit for the delay
>>
> estimate;
>
>> guess it's related to the existing status on the output side.
>>
>
>  In any case, using milliseconds feels more natural and it is most likely
>> an
>> operation which the client must perform anyhow.
>>
>
>  Could you investigate the amount of changes needed to go for ms instead?
>> I am
>> personally fine with an integer representation.
>>
>
>
>
>
http://codereview.chromium.**org/8234009/<http://codereview.chromium.org/8234...
>



-- 

Henrik Andreasson | Software Engineer | henrika@google.com | +46 70 376 91
74

Powered by Google App Engine
This is Rietveld 408576698