From af5e9f1211f0be823c8c71bc154c7b9ac3b332d4 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 24 Apr 2023 14:15:22 +0200 Subject: Add some logging messages to winmm to ease debugging and make the logging test pass --- src/cubeb_winmm.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/cubeb_winmm.c b/src/cubeb_winmm.c index 793ac71..84ebbaa 100644 --- a/src/cubeb_winmm.c +++ b/src/cubeb_winmm.c @@ -167,6 +167,8 @@ winmm_refill_stream(cubeb_stream * stm) long wanted; MMRESULT r; + ALOG("winmm_refill_stream"); + EnterCriticalSection(&stm->lock); stm->free_buffers += 1; XASSERT(stm->free_buffers > 0 && stm->free_buffers <= NBUFS); @@ -174,6 +176,7 @@ winmm_refill_stream(cubeb_stream * stm) if (stm->draining) { LeaveCriticalSection(&stm->lock); if (stm->free_buffers == NBUFS) { + ALOG("winmm_refill_stream draining"); stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_DRAINED); } SetEvent(stm->event); @@ -232,6 +235,8 @@ winmm_refill_stream(cubeb_stream * stm) return; } + ALOG("winmm_refill_stream %ld frames", got); + LeaveCriticalSection(&stm->lock); } @@ -575,6 +580,8 @@ winmm_stream_init(cubeb * context, cubeb_stream ** stream, *stream = stm; + LOG("winmm_stream_init OK"); + return CUBEB_OK; } -- cgit v1.2.3