https://bugs.webkit.org/show_bug.cgi?id=182612
Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez.
Source/WebCore:
Test: webaudio/silence-after-playback.html
* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::copyGStreamerBuffersToAudioChannel): Clear the bus if
the adapter can't provide enough data. This prevents a nasty noise
after playing songs in Winamp.
(WebCore::AudioSourceProviderGStreamer::setClient): No need to set
the client more than once, this fixes runtime warnings.
LayoutTests:
* webaudio/silence-after-playback-expected.wav: Added.
* webaudio/silence-after-playback.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228321
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2018-02-09 Philippe Normand <pnormand@igalia.com>
+
+ [GStreamer][WebAudio] Winamp2-js woes
+ https://bugs.webkit.org/show_bug.cgi?id=182612
+
+ Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez.
+
+ * webaudio/silence-after-playback-expected.wav: Added.
+ * webaudio/silence-after-playback.html: Added.
+
2018-02-09 Javier Fernandez <jfernandez@igalia.com>
[css-align] Implement the new behavior of 'legacy' for justify-items
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="../resources/js-test.js"></script>
+ <script src="resources/audio-testing.js"></script>
+ </head>
+
+ <body>
+ <div id="description"></div>
+ <div id="console"></div>
+
+ <script>
+ description("Test ensuring silence is output after <audio> playback ended.");
+
+ let context = 0;
+ const sampleRate = 44100.0;
+ const lengthInSeconds = 3;
+
+ function ended() {
+ context.startRendering();
+ context.oncomplete = finishAudioTest;
+ }
+
+ function runTest() {
+ context = new webkitOfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRate);
+
+ audioElement = new Audio();
+ audioElement.src = "resources/media/128kbps-44khz.mp3";
+ document.body.appendChild(audioElement);
+
+ mediaSource = context.createMediaElementSource(audioElement);
+ window.audioNode = mediaSource;
+
+ mediaSource.connect(context.destination);
+
+ audioElement.play();
+ audioElement.addEventListener("ended", ended, true);
+ testRunner.waitUntilDone();
+ }
+
+ runTest();
+ </script>
+ </body>
+</html>
+2018-02-08 Philippe Normand <pnormand@igalia.com>
+
+ [GStreamer][WebAudio] Winamp2-js woes
+ https://bugs.webkit.org/show_bug.cgi?id=182612
+
+ Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez.
+
+ Test: webaudio/silence-after-playback.html
+
+ * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
+ (WebCore::copyGStreamerBuffersToAudioChannel): Clear the bus if
+ the adapter can't provide enough data. This prevents a nasty noise
+ after playing songs in Winamp.
+ (WebCore::AudioSourceProviderGStreamer::setClient): No need to set
+ the client more than once, this fixes runtime warnings.
+
2018-02-09 Zalan Bujtas <zalan@apple.com>
[RenderTreeBuilder] Move multicolumn spanner mutation logic to RenderTreeBuilder
if (gst_adapter_available(adapter) >= bytes) {
gst_adapter_copy(adapter, bus->channel(channelNumber)->mutableData(), 0, bytes);
gst_adapter_flush(adapter, bytes);
- }
+ } else
+ bus->zero();
}
AudioSourceProviderGStreamer::AudioSourceProviderGStreamer()
void AudioSourceProviderGStreamer::setClient(AudioSourceProviderClient* client)
{
+ if (m_client)
+ return;
+
ASSERT(client);
m_client = client;