Bug 1061046. Part 22: test_mediaStreamAudioSourceNode no longer sees a 1-sample delay. r=karlt
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 23 Sep 2014 13:41:58 -0400
changeset 216611 43a6e96a661435bec48dd43aff13e063a149b277
parent 216610 62c91ba5efb2809605744b8ab7246c0a80337ccf
child 216612 42426a21f382fde74bf5b05ccc02025102d02aab
push id27858
push userkwierso@gmail.com
push dateFri, 21 Nov 2014 01:35:46 +0000
treeherdermozilla-central@6309710dd71d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1061046
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061046. Part 22: test_mediaStreamAudioSourceNode no longer sees a 1-sample delay. r=karlt
dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html
--- a/dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html
+++ b/dom/media/webaudio/test/test_mediaStreamAudioSourceNode.html
@@ -6,44 +6,44 @@
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="webaudio.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
-function createBuffer(context, delay) {
+function createBuffer(context) {
   var buffer = context.createBuffer(2, 2048, context.sampleRate);
-  for (var i = 0; i < 2048 - delay; ++i) {
-    buffer.getChannelData(0)[i + delay] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
-    buffer.getChannelData(1)[i + delay] = -buffer.getChannelData(0)[i + delay];
+  for (var i = 0; i < 2048; ++i) {
+    buffer.getChannelData(0)[i] = Math.sin(440 * 2 * Math.PI * i / context.sampleRate);
+    buffer.getChannelData(1)[i] = -buffer.getChannelData(0)[i];
   }
   return buffer;
 }
 
 var gTest = {
   length: 2048,
   skipOfflineContextTests: true,
   createGraph: function(context) {
     var sourceGraph = new AudioContext();
     var source = sourceGraph.createBufferSource();
-    source.buffer = createBuffer(context, 0);
+    source.buffer = createBuffer(context);
     var dest = sourceGraph.createMediaStreamDestination();
     source.connect(dest);
     source.start(0);
 
     var mediaStreamSource = context.createMediaStreamSource(dest.stream);
     // channelCount and channelCountMode should have no effect
     mediaStreamSource.channelCount = 1;
     mediaStreamSource.channelCountMode = "explicit";
     return mediaStreamSource;
   },
   createExpectedBuffers: function(context) {
-    return createBuffer(context, 1);
+    return createBuffer(context);
   },
 };
 
 runTest();
 
 </script>
 </pre>
 </body>