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

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

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Fixes to WebAudioDeviceImpl unit test. Created 3 years, 10 months 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) {
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 115
118 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const { 116 AudioDestinationHandler& AudioDestinationNode::audioDestinationHandler() const {
119 return static_cast<AudioDestinationHandler&>(handler()); 117 return static_cast<AudioDestinationHandler&>(handler());
120 } 118 }
121 119
122 unsigned long AudioDestinationNode::maxChannelCount() const { 120 unsigned long AudioDestinationNode::maxChannelCount() const {
123 return audioDestinationHandler().maxChannelCount(); 121 return audioDestinationHandler().maxChannelCount();
124 } 122 }
125 123
126 } // namespace blink 124 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698