Skip to content

[WIN32][DS] fixed: viz waveform would show a zero line at the end becaus... #4170

Merged
merged 1 commit into from Feb 9, 2014

6 participants

@wsoltys
Team Kodi member
wsoltys commented Feb 7, 2014

...e of not enough frames. Increasing the sound buffer to deliver > 512 frames.

@Anyone: Any side effects to fear?
@t-nelson, @jmarshallnz: for approval.

@t-nelson
@fritsch
Team Kodi member
fritsch commented Feb 7, 2014

It should not hurt (TM). DirectSound was the last sink, that submitted quite low values - it was mostly a "cosmetical" problem for Viz - cause of the 512 required for FFT it was filled up with zeros.

@jmarshallnz
Team Kodi member

I'd be concerned that you're doubling the latency of UI sounds. Wouldn't you notice this now with 240ms buffer length?

The alternate is setting uiFrameCount to something like 512 instead of 0.02*44100 = 882 (or 960, or whatever the samplerate is). If necessary you could push the number of these framebuffers up (i.e. change the *12 multiplier based on samplerate) incase DS needs a large buffer. If so, I'd start with the number of seconds you want and just use that (aligned to chunksize by dividing then multiplying).

@fritsch
Team Kodi member
fritsch commented Feb 7, 2014

what @jmarshallnz says makes sense - I did not think of the menu sounds.

@wsoltys
Team Kodi member
wsoltys commented Feb 8, 2014

The UI sounds sounded different as written here: http://forum.xbmc.org/showthread.php?tid=185255
but I had the feeling that the seldom hiccups on my other setup playing mp3's were gone. So as fernet wrote a bigger buffer would make sense.
But I don't know what are the appropriated values nor what needs to be aligned to what. @FernetMenta any recommendations? Multiplying with 0.015 works also fine and we're at 180ms and as I reckon still below of other sinks.

@fritsch
Team Kodi member
fritsch commented Feb 8, 2014

On PA and on ALSA I aimed on max 200ms Buffer. So that should be fine.

wsoltys [WIN32][DS] fixed: viz waveform would show a zero line at the end bec…
…ause of not enough frames. Increasing the sound buffer to deliver > 512 frames.
9371343
@FernetMenta
Team Kodi member

Looks sane. 180ms is ok. Further those who use DirectSound have turned keep alive off, right? In this case the buffer won't fill anyway for gui sounds.

@wsoltys
Team Kodi member
wsoltys commented Feb 9, 2014

Looks like the default for DS and WASAPI is keep alive on. Shall we better set both to off?
But the gui sounds are still quite okay with ka on.

@FernetMenta
Team Kodi member

Shall we better set both to off?

That's a setting for all sinks so I would keep it as is.

But the gui sounds are still quite okay with ka on

sure, 180ms is abut the same as we have for ALSA and PA.

@MartijnKaijser MartijnKaijser added this to the Pending for inclusion milestone Feb 9, 2014
@jmarshallnz
Team Kodi member

Fine with me then.

@jmarshallnz jmarshallnz merged commit 6b50441 into xbmc:master Feb 9, 2014
@wsoltys wsoltys deleted the wsoltys:dsbuffer branch Feb 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.