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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Updates based on reviewer comments. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #include "modules/webaudio/AudioDestinationNode.h" 26 #include "modules/webaudio/AudioDestinationNode.h"
27 #include "modules/webaudio/AudioNodeInput.h" 27 #include "modules/webaudio/AudioNodeInput.h"
28 #include "modules/webaudio/AudioNodeOutput.h" 28 #include "modules/webaudio/AudioNodeOutput.h"
29 #include "modules/webaudio/BaseAudioContext.h" 29 #include "modules/webaudio/BaseAudioContext.h"
30 #include "platform/audio/AudioUtilities.h" 30 #include "platform/audio/AudioUtilities.h"
31 #include "platform/audio/DenormalDisabler.h" 31 #include "platform/audio/DenormalDisabler.h"
32 #include "wtf/Atomics.h" 32 #include "wtf/Atomics.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 AudioDestinationHandler::AudioDestinationHandler(AudioNode& node, 36 AudioDestinationHandler::AudioDestinationHandler(AudioNode& node)
37 float sampleRate) 37 : AudioHandler(NodeTypeDestination, node, 0), m_currentSampleFrame(0) {
hongchan 2016/12/02 17:40:12 So the initial sample rate is zero? Not sure why t
Andrew MacPherson 2016/12/05 14:12:53 I mentioned in an earlier comment to rtoy@ that th
38 : AudioHandler(NodeTypeDestination, node, sampleRate),
39 m_currentSampleFrame(0) {
40 addInput(); 38 addInput();
41 } 39 }
42 40
43 AudioDestinationHandler::~AudioDestinationHandler() { 41 AudioDestinationHandler::~AudioDestinationHandler() {
44 DCHECK(!isInitialized()); 42 DCHECK(!isInitialized());
45 } 43 }
46 44
47 void AudioDestinationHandler::render(AudioBus* sourceBus, 45 void AudioDestinationHandler::render(AudioBus* sourceBus,
48 AudioBus* destinationBus, 46 AudioBus* destinationBus,
49 size_t numberOfFrames) { 47 size_t numberOfFrames) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 114
117 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const { 115 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const {
118 return static_cast<AudioDestinationHandler&>(handler()); 116 return static_cast<AudioDestinationHandler&>(handler());
119 } 117 }
120 118
121 unsigned long AudioDestinationNode::maxChannelCount() const { 119 unsigned long AudioDestinationNode::maxChannelCount() const {
122 return audioDestinationHandler().maxChannelCount(); 120 return audioDestinationHandler().maxChannelCount();
123 } 121 }
124 122
125 } // namespace blink 123 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698