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

Issue 2771093002: Use AudioUnit instead of AudioDevice properties to get channel count. (Closed)

Created:
3 years, 9 months ago by DaleCurtis
Modified:
3 years, 8 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, mac-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use AudioUnit instead of AudioDevice properties to get channel count. On some devices kAudioDevicePropertyPreferredChannelLayout is not available or lists the channel types as unknown. kAudioUnitProperty_AudioChannelLayout instead seems to always be set and correct, so use it instead. To do this, I've introduced a new helper class ScopedAudioUnit which helps with the allocation and deallocation of AudioUnits. In a followup patch set I'll convert the input and output streams to use this new mechanism. BUG=671308, 675787 TEST=user verified success. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2771093002 Cr-Commit-Position: refs/heads/master@{#460250} Committed: https://chromium.googlesource.com/chromium/src/+/5285d00f561827da882c8faaa7bda1d571c4fc60

Patch Set 1 : Add logging header. #

Patch Set 2 : Fix compile errors. #

Patch Set 3 : Fix enum type. #

Total comments: 1

Patch Set 4 : Revert deletion of GetDeviceTotalChannelCount. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -124 lines) Patch
M media/audio/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/mac/audio_auhal_mac.cc View 1 chunk +0 lines, -24 lines 0 comments Download
M media/audio/mac/audio_manager_mac.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 2 3 5 chunks +116 lines, -96 lines 0 comments Download
A media/audio/mac/scoped_audio_unit.h View 1 2 1 chunk +40 lines, -0 lines 0 comments Download
A media/audio/mac/scoped_audio_unit.cc View 1 1 chunk +53 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 21 (10 generated)
DaleCurtis
Hey Hongchan, have another multichannel change for you to test :p The bug reporter verified ...
3 years, 9 months ago (2017-03-23 22:14:42 UTC) #4
DaleCurtis
https://codereview.chromium.org/2771093002/diff/60001/media/audio/mac/audio_auhal_mac.cc File media/audio/mac/audio_auhal_mac.cc (left): https://codereview.chromium.org/2771093002/diff/60001/media/audio/mac/audio_auhal_mac.cc#oldcode117 media/audio/mac/audio_auhal_mac.cc:117: // Get the total number of output channels that ...
3 years, 9 months ago (2017-03-23 22:15:04 UTC) #5
tommi (sloooow) - chröme
lgtm
3 years, 9 months ago (2017-03-24 04:52:23 UTC) #6
hongchan
On 2017/03/24 04:52:23, tommi - chröme wrote: > lgtm This is what I got from ...
3 years, 9 months ago (2017-03-24 16:38:36 UTC) #7
DaleCurtis
Thanks hongchan@, looks like we have to keep GetDeviceTotalChannelCount() after all for 16 channel devices. ...
3 years, 9 months ago (2017-03-24 21:38:42 UTC) #8
hongchan
On 2017/03/24 21:38:42, DaleCurtis wrote: > Thanks hongchan@, looks like we have to keep GetDeviceTotalChannelCount() ...
3 years, 8 months ago (2017-03-28 19:33:24 UTC) #9
DaleCurtis
hongchan@ defers to tommi@ for review, so submitting. Thanks for testing and review!
3 years, 8 months ago (2017-03-28 21:30:11 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2771093002/80001
3 years, 8 months ago (2017-03-28 21:30:37 UTC) #13
commit-bot: I haz the power
Exceeded global retry quota
3 years, 8 months ago (2017-03-28 21:50:59 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2771093002/80001
3 years, 8 months ago (2017-03-29 00:02:56 UTC) #18
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 00:28:48 UTC) #21
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/5285d00f561827da882c8faaa7bd...

Powered by Google App Engine
This is Rietveld 408576698