xbmc/xbmc — pull request #2376 by fritsch (2013-03-06 08:27:56+00:00)
Title: AE: Clip max Buffersize to factor 8 and reduce periodSize (50ms) broken hw.

After some further tests of https://github.com/xbmc/xbmc/commit/f2faaa846e03cbcc1ba11f09baad690c792035c5 on more hardware within OpenELEC I found that some hardware reports really bogus values. BufferSize > 32K and immens high periodSize.

This approach tries to workaround these issues a bit, by reducing periodSize to 50 ms - in order to cope with menu sounds and clipping maxBufferSize to 16384.

On my Intel Card I have a max bufferSize of 8192 and a fixed period of 1024. I think we have to do the caching of the data elsewhere.

We could also see another solution:
set periodSize to min(whatHardwareCanDo, 2048) and choose Buffer as minOf(whatHWCanDo, 16384)

Open for discussion here. This is a hw / driver workaround. The original values were sane - but we have to adapt them to real world. An this world is not perfect.