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

Unified Diff: third_party/WebKit/Source/platform/audio/HRTFPanner.cpp

Issue 1820403002: Implement Automations for PannerNode and AutioListener (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update test because CL for min/maxValue AudioParam landed Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
diff --git a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
index e352f4594521680ae4d8d0fe8ced00ed4ce448df..bed5654772da8ebc306510e3cf9b29a6d754d678 100644
--- a/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
+++ b/third_party/WebKit/Source/platform/audio/HRTFPanner.cpp
@@ -292,6 +292,19 @@ void HRTFPanner::pan(double desiredAzimuth, double elevation, const AudioBus* in
}
}
+void HRTFPanner::panWithSampleAccurateValues(double* desiredAzimuth, double* elevation, const AudioBus* inputBus, AudioBus* outputBus, size_t framesToProcess)
+{
+ // Sample-accurate (a-rate) HRTF panner is not implemented, just k-rate. Just grab the current
+ // azimuth/elevation and use that.
+ //
+ // We are assuming that the inherent smoothing in the HRTF processing is good enough, and we
+ // don't want to increase the complexity of the HRTF panner by 15-20 times. (We need to cmopute
+ // one output sample for each possibly different impulse response. That N^2. Previously, we
+ // used an FFT to do them all at once for a complexity of N/log2(N). Hence, N/log2(N) times
+ // more complex.)
+ pan(desiredAzimuth[0], elevation[0], inputBus, outputBus, framesToProcess);
+}
+
double HRTFPanner::tailTime() const
{
// Because HRTFPanner is implemented with a DelayKernel and a FFTConvolver, the tailTime of the HRTFPanner
« no previous file with comments | « third_party/WebKit/Source/platform/audio/HRTFPanner.h ('k') | third_party/WebKit/Source/platform/audio/Panner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698