Source/Platform: Add audio hardware support for multi-channel by implementing AudioDestinationNode.maxChannelCount
https://bugs.webkit.org/show_bug.cgi?id=111385

Reviewed by James Robinson.

* chromium/public/Platform.h:
(WebKit::Platform::audioHardwareOutputChannels):

Source/WebCore: Add audio hardware support for multi-channel output by implementing AudioDestinationNode.maxChannelCount
https://bugs.webkit.org/show_bug.cgi?id=111385

Reviewed by James Robinson.

See specification details for .maxChannelCount:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDestinationNode

* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::maxChannelCount):
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioNode.h:
Implement .maxChannelCount attribute.

(AudioNode):
* Modules/webaudio/DefaultAudioDestinationNode.h:
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::initialize):
(WebCore::DefaultAudioDestinationNode::createDestination):
(WebCore::DefaultAudioDestinationNode::enableInput):
Call to createDestination() now takes no argument.
Instead we maintain a member variable for the input device ID.
(WebCore::DefaultAudioDestinationNode::maxChannelCount):
(WebCore::DefaultAudioDestinationNode::setChannelCount):
Check port-specific hardware support for maxChannelCount(),
and allow setting the channel count based on what the hardware
supports.

* platform/audio/AudioDestination.h:
(AudioDestination):
* platform/audio/chromium/AudioDestinationChromium.cpp:
(WebCore::AudioDestination::maxChannelCount):
(WebCore::AudioDestinationChromium::render):
Call into chromium WebKit API: audioHardwareOutputChannels().

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestination::maxChannelCount):
Add basic implementation for maxChannelCount() only supporting stereo output.

* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::maxChannelCount):
Add basic implementation for maxChannelCount() only supporting stereo output.
Later, the mac port can support more than this with some small improvements to AudioDestinationMac.


git-svn-id: https://svn.webkit.org/repository/webkit/trunk/Source/Platform/chromium/public@144720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 file changed
tree: bfede64d9c59a8ba85b8c73a5c8801e4c3916692
  1. android/
  2. default/
  3. linux/
  4. mac/
  5. win/
  6. Platform.h
  7. WebAnimation.h
  8. WebAnimationCurve.h
  9. WebAnimationDelegate.h
  10. WebAudioBus.h
  11. WebAudioDestinationConsumer.h
  12. WebAudioDevice.h
  13. WebBlobData.h
  14. WebBlobRegistry.h
  15. WebCanvas.h
  16. WebClipboard.h
  17. WebColor.h
  18. WebCommon.h
  19. WebCompositorOutputSurface.h
  20. WebCompositorSupport.h
  21. WebContentLayer.h
  22. WebContentLayerClient.h
  23. WebCookie.h
  24. WebCookieJar.h
  25. WebCString.h
  26. WebData.h
  27. WebDiscardableMemory.h
  28. WebDragData.h
  29. WebExternalTextureLayer.h
  30. WebExternalTextureLayerClient.h
  31. WebFileInfo.h
  32. WebFileSystem.h
  33. WebFileUtilities.h
  34. WebFilterOperation.h
  35. WebFilterOperations.h
  36. WebFlingAnimator.h
  37. WebFloatAnimationCurve.h
  38. WebFloatKeyframe.h
  39. WebFloatPoint.h
  40. WebFloatQuad.h
  41. WebFloatRect.h
  42. WebGamepad.h
  43. WebGamepads.h
  44. WebGestureCurve.h
  45. WebGestureCurveTarget.h
  46. WebGraphicsContext3D.h
  47. WebGraphicsMemoryAllocation.h
  48. WebGraphicsMemoryStats.h
  49. WebHTTPBody.h
  50. WebHTTPHeaderVisitor.h
  51. WebHTTPLoadInfo.h
  52. WebHyphenator.h
  53. WebImage.h
  54. WebImageLayer.h
  55. WebInputHandler.h
  56. WebInputHandlerClient.h
  57. WebIOSurfaceLayer.h
  58. WebLayer.h
  59. WebLayerScrollClient.h
  60. WebLayerTreeView.h
  61. WebLayerTreeViewClient.h
  62. WebLocalizedString.h
  63. WebMediaConstraints.h
  64. WebMediaStream.h
  65. WebMediaStreamCenter.h
  66. WebMediaStreamCenterClient.h
  67. WebMediaStreamSource.h
  68. WebMediaStreamSourcesRequest.h
  69. WebMediaStreamTrack.h
  70. WebMessagePortChannel.h
  71. WebMessagePortChannelClient.h
  72. WebMimeRegistry.h
  73. WebNonCopyable.h
  74. WebPluginListBuilder.h
  75. WebPoint.h
  76. WebPrerender.h
  77. WebPrerenderingSupport.h
  78. WebPrivateOwnPtr.h
  79. WebPrivatePtr.h
  80. WebRect.h
  81. WebReferrerPolicy.h
  82. WebRenderingStats.h
  83. WebRTCConfiguration.h
  84. WebRTCDataChannelHandler.h
  85. WebRTCDataChannelHandlerClient.h
  86. WebRTCDTMFSenderHandler.h
  87. WebRTCDTMFSenderHandlerClient.h
  88. WebRTCICECandidate.h
  89. WebRTCPeerConnectionHandler.h
  90. WebRTCPeerConnectionHandlerClient.h
  91. WebRTCSessionDescription.h
  92. WebRTCSessionDescriptionRequest.h
  93. WebRTCStatsRequest.h
  94. WebRTCStatsResponse.h
  95. WebRTCVoidRequest.h
  96. WebScreenInfo.h
  97. WebScrollbar.h
  98. WebScrollbarLayer.h
  99. WebScrollbarThemeGeometry.h
  100. WebScrollbarThemePainter.h
  101. WebSharedGraphicsContext3D.h
  102. WebSize.h
  103. WebSocketStreamError.h
  104. WebSocketStreamHandle.h
  105. WebSocketStreamHandleClient.h
  106. WebSolidColorLayer.h
  107. WebStorageArea.h
  108. WebStorageNamespace.h
  109. WebString.h
  110. WebThread.h
  111. WebThreadSafeData.h
  112. WebTransformAnimationCurve.h
  113. WebTransformationMatrix.h
  114. WebTransformKeyframe.h
  115. WebTransformOperations.h
  116. WebUnitTestSupport.h
  117. WebURL.h
  118. WebURLError.h
  119. WebURLLoader.h
  120. WebURLLoaderClient.h
  121. WebURLLoadTiming.h
  122. WebURLRequest.h
  123. WebURLResponse.h
  124. WebVector.h
  125. WebVideoFrame.h
  126. WebVideoFrameProvider.h
  127. WebVideoLayer.h
  128. WebWorkerRunLoop.h