summaryrefslogtreecommitdiff
path: root/subprojects/packagefiles/miniaudio/miniaudio_pulse_flush.diff
blob: 293ba943eb08eae694df838f188041027821871c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/miniaudio.h b/miniaudio.h
index a5673ac..cf73a54 100644
--- a/miniaudio.h
+++ b/miniaudio.h
@@ -16243,7 +16243,7 @@ static void ma_thread_wait__posix(ma_thread* pThread)
 static ma_result ma_mutex_init__posix(ma_mutex* pMutex)
 {
     int result;
-
+
     if (pMutex == NULL) {
         return MA_INVALID_ARGS;
     }
@@ -30906,7 +30906,8 @@ static ma_result ma_device_stop__pulse(ma_device* pDevice)
         happens, draining never completes and we get stuck here. For now I'm disabling draining of
         the device so we don't just freeze the application.
         */
-    #if 0
+    #if 1
+        ma_bool32 wasSuccessful = MA_FALSE;
         ma_pa_operation* pOP = ((ma_pa_stream_drain_proc)pDevice->pContext->pulse.pa_stream_drain)((ma_pa_stream*)pDevice->pulse.pStreamPlayback, ma_pulse_operation_complete_callback, &wasSuccessful);
         ma_wait_for_operation_and_unref__pulse(pDevice->pContext, pDevice->pulse.pMainLoop, pOP);
     #endif