Page 1 of 1

DirectX audio output, endless buffer repeat

Posted: 03 Sep 2014 12:50
by L5730
Hi all,
My apologies if this topic should be in the streaming section. Seeing as it is not about creating a stream, just receiving, I thought it better to be under a Windows issue.

Right, the problem is that when a received stream is stopped (the internet dies at either end, or the streamer stops streaming), VLC will repeat the buffer endlessly.
I've been playing around with pushing streams and that all works fine, just this issue is quite irritating when I stop the streamer instance. Instead of VLC realising there is no new audio (as the stream no longer exists), it loops what it's got, maybe a couple of seconds for ever, until I quit it, or press stop.

The issue is with the DirectX audio output module, as If I switch to using WavOut, I do not get this endless buffer loop, but I get silence, as I'd expect.
There's something in the way the DirectX audio module is not having it's buffer flushed or something, whereas with WavOut it does do this.
Whether or not there is still an endless loop with WavOut I don't know, but it's silence and that is more practical.

I've done some 'net searching and not really found anything that makes sense.
If anyone can shed some light on this, I'd be most grateful.

Windows 7 Pro x64
VLC 2.1.5
Thanks.

Re: DirectX audio output, endless buffer repeat

Posted: 03 Sep 2014 18:38
by RĂ©mi Denis-Courmont
DirectSound is designed for games and circle the buffers on purpose - if the application fails to feed new samples on time. Note that VLC 2.1.5 is quite broken on Windows 64-bits due to toolchain problems; I'd recommend "downgrading" VLC to 32-bits.