Andrew Eikum : winepulse.drv: Avoid unrealistically low period sizes.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 22 08:57:37 CST 2016


Module: wine
Branch: master
Commit: 899c3fc4c404814ae4a22f6cad72a2b0ae49925a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=899c3fc4c404814ae4a22f6cad72a2b0ae49925a

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Feb 19 10:47:13 2016 -0600

winepulse.drv: Avoid unrealistically low period sizes.

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winepulse.drv/mmdevdrv.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index ef171d3..4ba329e 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -412,13 +412,17 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
             {}
         }
     }
+
     if (stream)
         pa_stream_unref(stream);
+
     if (length)
         pulse_def_period[!render] = pulse_min_period[!render] = pa_bytes_to_usec(10 * length, &ss);
-    else
+
+    if (pulse_min_period[!render] < MinimumPeriod)
         pulse_min_period[!render] = MinimumPeriod;
-    if (pulse_def_period[!render] <= DefaultPeriod)
+
+    if (pulse_def_period[!render] < DefaultPeriod)
         pulse_def_period[!render] = DefaultPeriod;
 
     wfx->wFormatTag = WAVE_FORMAT_EXTENSIBLE;




More information about the wine-cvs mailing list