|
|
Chromium Code Reviews|
Created:
5 years, 11 months ago by hongchan Modified:
5 years, 5 months ago CC:
chromium-reviews, mkwst+moarreviews-renderer_chromium.org, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, Raymond Toy, DaleCurtis Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSupport more than 8 channels on AudioContext.destination node on OSX. Note that this patch does not fix the issue for Windows/Linux multichannel support.
When an audio hardware with 8 or more outputs used by Chrome, setting AudioContext.destination.channelCount beyond 8 results silence.
context.destination.channelCount = 9; // Result silence.
This is because the current implementation of channel layout with corresponding channel count is incomplete.
This patch resolves the issue by:
- Enforcing CHANNEL_LAYOUT_DISCRETE when user sets the channel count more than 8.
- When the channel layout is 'discrete', use explicit channel count specified by user to create a WebAudioDevice object.
BUG=424795
Committed: https://crrev.com/1d8996d3c518a873d213962990ebb6c755fdb8df
Cr-Commit-Position: refs/heads/master@{#340305}
Patch Set 1 #
Total comments: 3
Patch Set 2 : #Patch Set 3 : Bring ToT #Messages
Total messages: 25 (7 generated)
hongchan@chromium.org changed reviewers: + dalecurtis@chromium.org, rtoy@chromium.org
https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... content/renderer/renderer_blink_platform_impl.cc:704: // TODO(crogers): WebKit should give the channel layout instead of the hard This TODO is still true isn't it? WebKit does still give the channel count and not the layout, right?
https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... content/renderer/renderer_blink_platform_impl.cc:704: // TODO(crogers): WebKit should give the channel layout instead of the hard On 2015/01/08 21:55:54, Raymond Toy wrote: > This TODO is still true isn't it? WebKit does still give the channel count and > not the layout, right? Still true for WebKit, but here at Blink we have the implementation of CHANNEL_LAYOUT_*. I thought it only applies to WebKit and the comment is outdated - but I don't mind reverting the comment back.
This is fine with me, but I think this will only work on OSX since only the OSX AudioManager and output driver supports CHANNEL_LAYOUT_DISCRETE. The other platforms will need more extensive modifications to support this correctly.
https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... File content/renderer/renderer_blink_platform_impl.cc (left): https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... content/renderer/renderer_blink_platform_impl.cc:704: // TODO(crogers): WebKit should give the channel layout instead of the hard On 2015/01/08 21:58:33, hoch wrote: > On 2015/01/08 21:55:54, Raymond Toy wrote: > > This TODO is still true isn't it? WebKit does still give the channel count > and > > not the layout, right? > > Still true for WebKit, but here at Blink we have the implementation of > CHANNEL_LAYOUT_*. I thought it only applies to WebKit and the comment is > outdated - but I don't mind reverting the comment back. But creatAudioDevice still takes unsigned channels, and not some kind of channel layout enum or object. I think that's what the comment is referring to. (Substitute Blink for WebKit).
For this file I don't think there's much unittest you can add if there's not one already. It'd be a lot of work to set one up here I believe. I'm also not an owner for this code, so while lgtm, you'll need to find a content owner.
On 2015/01/08 22:01:21, DaleCurtis wrote: > This is fine with me, but I think this will only work on OSX since only the OSX > AudioManager and output driver supports CHANNEL_LAYOUT_DISCRETE. > > The other platforms will need more extensive modifications to support this > correctly. Could you please let me know where to start? Not sure where to look for audio devices on other platforms. Currently I am looking at: src/media/audio/audio_manager.cc src/media/audio/audio_manager.h src/media/audio/audio_manager_base.cc src/media/audio/audio_manager_base.h With that said, it would be great if we can make this work on OSX at least.
On 2015/01/08 22:02:57, Raymond Toy wrote: > https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... > File content/renderer/renderer_blink_platform_impl.cc (left): > > https://codereview.chromium.org/810763006/diff/1/content/renderer/renderer_bl... > content/renderer/renderer_blink_platform_impl.cc:704: // TODO(crogers): WebKit > should give the channel layout instead of the hard > On 2015/01/08 21:58:33, hoch wrote: > > On 2015/01/08 21:55:54, Raymond Toy wrote: > > > This TODO is still true isn't it? WebKit does still give the channel count > > and > > > not the layout, right? > > > > Still true for WebKit, but here at Blink we have the implementation of > > CHANNEL_LAYOUT_*. I thought it only applies to WebKit and the comment is > > outdated - but I don't mind reverting the comment back. > > But creatAudioDevice still takes unsigned channels, and not some kind of channel > layout enum or object. I think that's what the comment is referring to. > (Substitute Blink for WebKit). I see. Then I will bring the comment back in the patch set 2. Thanks!
Sorry I don't really have any pointer other than to see what AudioManagerMac is doing with discrete. You'll want to look at the PulseAudio, WASAPI, and WaveOut drivers within media/audio/pulse and media/audio/win to figure out how channel configurations work.
On 2015/01/08 22:19:31, DaleCurtis wrote: > Sorry I don't really have any pointer other than to see what AudioManagerMac is > doing with discrete. You'll want to look at the PulseAudio, WASAPI, and WaveOut > drivers within media/audio/pulse and media/audio/win to figure out how channel > configurations work. Thanks for the pointer!
hongchan@chromium.org changed reviewers: + avi@chromium.org - dalecurtis@chromium.org, rtoy@chromium.org
On 2015/01/08 22:19:59, hoch wrote: > On 2015/01/08 22:19:31, DaleCurtis wrote: > > Sorry I don't really have any pointer other than to see what AudioManagerMac > is > > doing with discrete. You'll want to look at the PulseAudio, WASAPI, and > WaveOut > > drivers within media/audio/pulse and media/audio/win to figure out how channel > > configurations work. > > Thanks for the pointer! If Dale is happy, so am I. LGTM
rtoy@chromium.org changed reviewers: + rtoy@chromium.org
Please file a bug to say this needs to be implemented for Windows and Linux. (And Android too?) And reference this bug in the description.
On 2015/01/09 19:07:14, Raymond Toy wrote: > Please file a bug to say this needs to be implemented for Windows and Linux. > (And Android too?) And reference this bug in the description. As Dale suggested, Ray and I decided to postpone this CL until we test Windows/Linux platform. We are ordering a 16 channel audio interface soon, so we'll be able to run this patch locally. Meanwhile I will try to look at PulseAudio, WASAPI, and WaveOut drivers as well. I will keep you all posted. Thanks!
On 2015/01/09 19:19:15, hoch wrote: > On 2015/01/09 19:07:14, Raymond Toy wrote: > > Please file a bug to say this needs to be implemented for Windows and Linux. > > (And Android too?) And reference this bug in the description. > > As Dale suggested, Ray and I decided to postpone this CL until we test > Windows/Linux platform. We are ordering a 16 channel audio interface soon, so > we'll be able to run this patch locally. Meanwhile I will try to look at > PulseAudio, WASAPI, and WaveOut drivers as well. > > I will keep you all posted. Thanks! CLs that require you to buy new toys with which to test them are the best CLs. Enjoy! :)
Here is the verification report after L-G-T-M: Tested PS3 with the recently obtained multichannel audio device (FCA1616): - On OSX (10.10.4), PS3 successfully could play the audio through 16 individual channels. - On Windows 7, I've tested and verified this patch with FCA1616 which unfortunately supports only up to 8 channels on a single audio device entry. - On Ubuntu, the test device is not compatible with PulseAudio so I couldn't verify the multichannel test. However, the patched build didn't crash with the default stereo device. xsrf_token: 5b9f5ad1eab75c0703395ac6c38f29dd send_mail: on subject: Support more than 8 channels for AudioContext.destination node on OSX
Patchset #3 (id:40001) has been deleted
The CQ bit was checked by hongchan@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from avi@chromium.org, dalecurtis@chromium.org Link to the patchset: https://codereview.chromium.org/810763006/#ps60001 (title: "Bring ToT")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/810763006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/810763006/60001
dalecurtis@chromium.org changed reviewers: + dalecurtis@chromium.org
Still lgtm, thanks for getting the toys and testing :)
Message was sent while issue was closed.
Committed patchset #3 (id:60001)
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/1d8996d3c518a873d213962990ebb6c755fdb8df Cr-Commit-Position: refs/heads/master@{#340305} |
