From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Sun, 25 Mar 2018 21:49:37 +0200
Subject: AudioBuffer, AnalyserNode: fingerprinting mitigations via IDL

Return fixed base latency
---
 third_party/blink/renderer/modules/webaudio/analyser_node.idl | 8 ++++----
 third_party/blink/renderer/modules/webaudio/audio_buffer.idl  | 4 ++--
 third_party/blink/renderer/modules/webaudio/audio_context.cc  | 1 +
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/third_party/blink/renderer/modules/webaudio/analyser_node.idl b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
--- a/third_party/blink/renderer/modules/webaudio/analyser_node.idl
+++ b/third_party/blink/renderer/modules/webaudio/analyser_node.idl
@@ -42,10 +42,10 @@ interface AnalyserNode : AudioNode {
 
     // Copies the current frequency data into the passed array.
     // If the array has fewer elements than the frequencyBinCount, the excess elements will be dropped.
-    [HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
-    [HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
+    //[HighEntropy, Measure] void getFloatFrequencyData(Float32Array array);
+    //[HighEntropy, Measure] void getByteFrequencyData(Uint8Array array);
 
     // Real-time waveform data
-    [HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
-    [HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
+    //[HighEntropy, Measure] void getFloatTimeDomainData(Float32Array array);
+    //[HighEntropy, Measure] void getByteTimeDomainData(Uint8Array array);
 };
diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.idl
@@ -38,7 +38,7 @@
 
     // Channel access
     readonly attribute unsigned long numberOfChannels;
-    [HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
-    [HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
+    //[HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
+    //[HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long startInChannel = 0);
     [RaisesException] void copyToChannel(Float32Array source, long channelNumber, optional unsigned long startInChannel = 0);
 };
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context.cc b/third_party/blink/renderer/modules/webaudio/audio_context.cc
--- a/third_party/blink/renderer/modules/webaudio/audio_context.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_context.cc
@@ -324,6 +324,7 @@ void AudioContext::StopRendering() {
 double AudioContext::baseLatency() const {
   DCHECK(IsMainThread());
   DCHECK(destination());
+  return 0.04;
 
   // TODO(hongchan): Due to the incompatible constructor between
   // AudioDestinationNode and RealtimeAudioDestinationNode, casting directly
-- 
2.11.0

