Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp |
| index f6f9c48cc2f7924c6f9148ed9c5f8a6dd623b376..f4e7e655151056dc2306269ced4656e733f95cd0 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/DefaultAudioDestinationNode.cpp |
| @@ -31,9 +31,12 @@ |
| namespace blink { |
| -DefaultAudioDestinationHandler::DefaultAudioDestinationHandler(AudioNode& node) |
| +DefaultAudioDestinationHandler::DefaultAudioDestinationHandler( |
| + AudioNode& node, |
| + const WebAudioLatencyHint& latencyHint) |
| : AudioDestinationHandler(node, AudioDestination::hardwareSampleRate()), |
| - m_numberOfInputChannels(0) { |
| + m_numberOfInputChannels(0), |
| + m_latencyHint(latencyHint) { |
| // Node-specific default mixing rules. |
| m_channelCount = 2; |
| setInternalChannelCountMode(Explicit); |
| @@ -41,8 +44,9 @@ DefaultAudioDestinationHandler::DefaultAudioDestinationHandler(AudioNode& node) |
| } |
| PassRefPtr<DefaultAudioDestinationHandler> |
| -DefaultAudioDestinationHandler::create(AudioNode& node) { |
| - return adoptRef(new DefaultAudioDestinationHandler(node)); |
| +DefaultAudioDestinationHandler::create(AudioNode& node, |
| + const WebAudioLatencyHint& latencyHint) { |
| + return adoptRef(new DefaultAudioDestinationHandler(node, latencyHint)); |
| } |
| DefaultAudioDestinationHandler::~DefaultAudioDestinationHandler() { |
| @@ -75,12 +79,9 @@ void DefaultAudioDestinationHandler::uninitialize() { |
| } |
| void DefaultAudioDestinationHandler::createDestination() { |
| - float hardwareSampleRate = AudioDestination::hardwareSampleRate(); |
| - VLOG(1) << ">>>> hardwareSampleRate = " << hardwareSampleRate; |
|
Raymond Toy
2016/11/15 18:16:17
I hope we didn't lose this log print. It's really
Andrew MacPherson
2016/11/16 10:58:29
Should I re-add the log print though we won't pass
|
| - |
| m_destination = AudioDestination::create( |
| *this, m_inputDeviceId, m_numberOfInputChannels, channelCount(), |
| - hardwareSampleRate, context()->getSecurityOrigin()); |
| + m_latencyHint, context()->getSecurityOrigin()); |
| } |
| void DefaultAudioDestinationHandler::startRendering() { |
| @@ -136,14 +137,16 @@ void DefaultAudioDestinationHandler::setChannelCount( |
| // ---------------------------------------------------------------- |
| DefaultAudioDestinationNode::DefaultAudioDestinationNode( |
| - BaseAudioContext& context) |
| + BaseAudioContext& context, |
| + const WebAudioLatencyHint& latencyHint) |
| : AudioDestinationNode(context) { |
| - setHandler(DefaultAudioDestinationHandler::create(*this)); |
| + setHandler(DefaultAudioDestinationHandler::create(*this, latencyHint)); |
| } |
| DefaultAudioDestinationNode* DefaultAudioDestinationNode::create( |
| - BaseAudioContext* context) { |
| - return new DefaultAudioDestinationNode(*context); |
| + BaseAudioContext* context, |
| + const WebAudioLatencyHint& latencyHint) { |
| + return new DefaultAudioDestinationNode(*context, latencyHint); |
| } |
| } // namespace blink |