[GStreamer][WebAudio] Winamp2-js woes
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2018 16:48:53 +0000 (16:48 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Feb 2018 16:48:53 +0000 (16:48 +0000)
commit65c50ae6f52bb3f778edf34c5bf84ded18bd5ddf
tree2cfd982a5b52b753bb4d6a550115204c8147002f
parentf1c373dde00561f4a3f4cc1c84f54c08b19877db
[GStreamer][WebAudio] Winamp2-js woes
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
LayoutTests/ChangeLog
LayoutTests/platform/gtk/webaudio/silence-after-playback-expected.wav [new file with mode: 0644]
LayoutTests/platform/mac/webaudio/silence-after-playback-expected.wav [new file with mode: 0644]
LayoutTests/webaudio/silence-after-playback.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp