Bug 1203836 - Properly handle silent chunks in AudioNodeExternalInputStream. r=karlt
authorPaul Adenot <paul@paul.cx>
Mon, 21 Sep 2015 10:14:59 +0200
changeset 263599 68d05b03e9f1403e7398161162f665271eebe78c
parent 263598 1cfa12953f657948c250d4e15caabde155848fc5
child 263600 abdbbdfa88e8e48933fa9fa0730c1c2a6e1ff6a1
push id29415
push usercbook@mozilla.com
push dateTue, 22 Sep 2015 10:41:24 +0000
treeherdermozilla-central@a1ccea59e254 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1203836
milestone43.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 1203836 - Properly handle silent chunks in AudioNodeExternalInputStream. r=karlt
dom/media/webaudio/AudioNodeExternalInputStream.cpp
--- a/dom/media/webaudio/AudioNodeExternalInputStream.cpp
+++ b/dom/media/webaudio/AudioNodeExternalInputStream.cpp
@@ -104,18 +104,22 @@ static void ConvertSegmentToAudioBlock(A
       case AUDIO_FORMAT_S16: {
         CopyChunkToBlock<int16_t>(*ci, aBlock, duration);
         break;
       }
       case AUDIO_FORMAT_FLOAT32: {
         CopyChunkToBlock<float>(*ci, aBlock, duration);
         break;
       }
-      case AUDIO_FORMAT_SILENCE:
+      case AUDIO_FORMAT_SILENCE: {
+        // The actual type of the sample does not matter here, but we still need
+        // to send some audio to the graph.
+        CopyChunkToBlock<float>(*ci, aBlock, duration);
         break;
+      }
     }
     duration += ci->GetDuration();
   }
 }
 
 void
 AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
                                            uint32_t aFlags)