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

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

Issue 2420983002: AudioParams with automations must process timelines (Closed)
Patch Set: Fix paths. Created 3 years, 11 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 listenerPosition); 227 listenerPosition);
228 } 228 }
229 229
230 m_panner->panWithSampleAccurateValues(azimuth, elevation, source, destination, 230 m_panner->panWithSampleAccurateValues(azimuth, elevation, source, destination,
231 framesToProcess, 231 framesToProcess,
232 internalChannelInterpretation()); 232 internalChannelInterpretation());
233 destination->copyWithSampleAccurateGainValuesFrom(*destination, totalGain, 233 destination->copyWithSampleAccurateGainValuesFrom(*destination, totalGain,
234 framesToProcess); 234 framesToProcess);
235 } 235 }
236 236
237 void PannerHandler::processOnlyAudioParams(size_t framesToProcess) {
238 float values[AudioUtilities::kRenderQuantumFrames];
239
240 DCHECK_LE(framesToProcess, AudioUtilities::kRenderQuantumFrames);
241
242 m_positionX->calculateSampleAccurateValues(values, framesToProcess);
243 m_positionY->calculateSampleAccurateValues(values, framesToProcess);
244 m_positionZ->calculateSampleAccurateValues(values, framesToProcess);
245
246 m_orientationX->calculateSampleAccurateValues(values, framesToProcess);
247 m_orientationY->calculateSampleAccurateValues(values, framesToProcess);
248 m_orientationZ->calculateSampleAccurateValues(values, framesToProcess);
249 }
250
237 void PannerHandler::initialize() { 251 void PannerHandler::initialize() {
238 if (isInitialized()) 252 if (isInitialized())
239 return; 253 return;
240 254
241 m_panner = Panner::create(m_panningModel, sampleRate(), 255 m_panner = Panner::create(m_panningModel, sampleRate(),
242 listener()->hrtfDatabaseLoader()); 256 listener()->hrtfDatabaseLoader());
243 listener()->addPanner(*this); 257 listener()->addPanner(*this);
244 258
245 // Set the cached values to the current values to start things off. The 259 // Set the cached values to the current values to start things off. The
246 // panner is already marked as dirty, so this won't matter. 260 // panner is already marked as dirty, so this won't matter.
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 visitor->trace(m_positionZ); 805 visitor->trace(m_positionZ);
792 806
793 visitor->trace(m_orientationX); 807 visitor->trace(m_orientationX);
794 visitor->trace(m_orientationY); 808 visitor->trace(m_orientationY);
795 visitor->trace(m_orientationZ); 809 visitor->trace(m_orientationZ);
796 810
797 AudioNode::trace(visitor); 811 AudioNode::trace(visitor);
798 } 812 }
799 813
800 } // namespace blink 814 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/PannerNode.h ('k') | third_party/WebKit/Source/modules/webaudio/StereoPannerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698