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

Issue 8276034: This patch will loop through the soundcard and return a list of available devices when the AudioI... (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)
Visibility:
Public.

Description

This patch will loop through the soundcard and return a list of available devices when the AudioInputDeviceManager does the device enumeration. Previously, only default device will be returned. This is a step forward to support device selection on Mac. I have another similar CL but on Linux: http://codereview.chromium.org/8162015/ Examples for how the device enumeration with this patch: name id Built-in Line Input AppleHDAEngineInput:1B,0,1,1:4 Built-in Digital Input AppleHDAEngineInput:1B,0,1,2:5 SB Arena Headset AppleUSBAudioEngine:Creative Technology:SB Arena Headset:5d100000:2,1 Bug=None Test=media_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107771

Patch Set 1 #

Total comments: 24

Patch Set 2 : update #

Total comments: 8

Patch Set 3 : use AudioObjectGetPropertyDataSize to avoid deprecated AudioHardwareGetProperty #

Total comments: 4

Patch Set 4 : update #

Total comments: 22

Patch Set 5 : '' #

Total comments: 8

Patch Set 6 : adding CFRelease to fix the memory leak #

Patch Set 7 : replace the deprecated AudioDevice* API with AudioObject* API #

Total comments: 4

Patch Set 8 : fixed the tests and updated code based on comment from Avi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -8 lines) Patch
M media/audio/audio_input_device_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 2 3 4 5 6 7 3 chunks +128 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
no longer working on chromium
Hi, This CL is to get a full list of devices for GetAudioInputDeviceNames(), there will ...
9 years, 2 months ago (2011-10-14 14:12:06 UTC) #1
Chris Rogers
Looks pretty good overall - some comments below: http://codereview.chromium.org/8276034/diff/1/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/1/media/audio/mac/audio_manager_mac.cc#newcode68 media/audio/mac/audio_manager_mac.cc:68: static ...
9 years, 2 months ago (2011-10-19 01:31:49 UTC) #2
no longer working on chromium
Update the code based on the comments from Chris, and also update the description to ...
9 years, 2 months ago (2011-10-19 17:32:18 UTC) #3
scherkus (not reviewing)
few nits also should we be using AudioHardwareGetProperty()? according to a previous code review that ...
9 years, 2 months ago (2011-10-19 17:38:50 UTC) #4
no longer working on chromium
Thanks Andrew for pointing out the deprecated AudioHardwareGetProperty. I have already changed to use the ...
9 years, 2 months ago (2011-10-19 18:13:21 UTC) #5
scherkus (not reviewing)
http://codereview.chromium.org/8276034/diff/5001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/5001/media/audio/mac/audio_manager_mac.cc#newcode71 media/audio/mac/audio_manager_mac.cc:71: if (!device_names) is this valid? seems like programmer error ...
9 years, 2 months ago (2011-10-19 18:19:25 UTC) #6
no longer working on chromium
http://codereview.chromium.org/8276034/diff/5001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/5001/media/audio/mac/audio_manager_mac.cc#newcode71 media/audio/mac/audio_manager_mac.cc:71: if (!device_names) On 2011/10/19 18:19:26, scherkus wrote: > is ...
9 years, 2 months ago (2011-10-21 12:35:29 UTC) #7
scherkus (not reviewing)
LGTM w/ nit http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc#newcode72 media/audio/mac/audio_manager_mac.cc:72: nit: get rid of blank line
9 years, 2 months ago (2011-10-24 18:32:13 UTC) #8
henrika (OOO until Aug 14)
Looks good but I feel that some clarifications can be done.
9 years, 2 months ago (2011-10-24 18:51:20 UTC) #9
henrika (OOO until Aug 14)
http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc#newcode77 media/audio/mac/audio_manager_mac.cc:77: kAudioHardwarePropertyDevices, // mSelector Why did you add these comments? ...
9 years, 2 months ago (2011-10-24 18:51:36 UTC) #10
no longer working on chromium
http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/10001/media/audio/mac/audio_manager_mac.cc#newcode72 media/audio/mac/audio_manager_mac.cc:72: On 2011/10/24 18:32:13, scherkus wrote: > nit: get rid ...
9 years, 2 months ago (2011-10-24 22:32:30 UTC) #11
henrika (OOO until Aug 14)
Looks good. LGTM.
9 years, 1 month ago (2011-10-26 18:30:14 UTC) #12
Chris Rogers
LGTM - but please fix the memory leak http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc#newcode160 media/audio/mac/audio_manager_mac.cc:160: } ...
9 years, 1 month ago (2011-10-26 18:52:44 UTC) #13
no longer working on chromium
http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc#newcode160 media/audio/mac/audio_manager_mac.cc:160: } On 2011/10/26 18:52:44, Chris Rogers wrote: > I ...
9 years, 1 month ago (2011-10-26 21:33:08 UTC) #14
Avi (use Gerrit)
Calls starting with AudioDevice are obsolete; please use the AudioObject calls instead. http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc ...
9 years, 1 month ago (2011-10-26 21:44:24 UTC) #15
Chris Rogers
http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/17001/media/audio/mac/audio_manager_mac.cc#newcode160 media/audio/mac/audio_manager_mac.cc:160: } It's documented in AudioHardware.h in the discussion about ...
9 years, 1 month ago (2011-10-26 21:49:43 UTC) #16
Avi (use Gerrit)
> "The caller is responsible for releasing the returned CFObject." A comment in the code ...
9 years, 1 month ago (2011-10-26 21:53:00 UTC) #17
no longer working on chromium
Added the comment "We are responsible for releasing the returned CFObject." Replaced the deprecated AudioDevice* ...
9 years, 1 month ago (2011-10-27 01:04:57 UTC) #18
Avi (use Gerrit)
lgtm http://codereview.chromium.org/8276034/diff/26002/media/audio/mac/audio_manager_mac.cc File media/audio/mac/audio_manager_mac.cc (right): http://codereview.chromium.org/8276034/diff/26002/media/audio/mac/audio_manager_mac.cc#newcode175 media/audio/mac/audio_manager_mac.cc:175: // We are responsible for releasing the returned ...
9 years, 1 month ago (2011-10-27 05:07:14 UTC) #19
no longer working on chromium
Fixed the tests and changed the comment/code corresponding to the review feedback from Avi. Ready ...
9 years, 1 month ago (2011-10-28 16:32:36 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/8276034/29001
9 years, 1 month ago (2011-10-28 18:08:10 UTC) #21
commit-bot: I haz the power
9 years, 1 month ago (2011-10-28 19:22:22 UTC) #22
Change committed as 107771

Powered by Google App Engine
This is Rietveld 408576698