Module: wine Branch: master Commit: 8e9763871b6f33e298c4c24627c490b1b46dda7e URL: https://gitlab.winehq.org/wine/wine/-/commit/8e9763871b6f33e298c4c24627c490b...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Mon Jan 9 07:06:11 2023 +1100
faudio: Purge and clear notifications on ShutDown.
Cherry-picked from upstream commit 16f86bffec36b6e82e5c93d5f04ebc4ee4f980ab.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54264
---
libs/faudio/src/FACT.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/libs/faudio/src/FACT.c b/libs/faudio/src/FACT.c index 649abf2111c..d40e56f12e6 100644 --- a/libs/faudio/src/FACT.c +++ b/libs/faudio/src/FACT.c @@ -352,6 +352,16 @@ uint32_t FACTAudioEngine_ShutDown(FACTAudioEngine *pEngine) FAudio_StopEngine(pEngine->audio); }
+ /* Purge All pending notifactions */ + while (pEngine->wb_notifications_list) + { + FACTNotification *note = (FACTNotification*) pEngine->wb_notifications_list->entry; + pEngine->notificationCallback(note); + LinkedList_RemoveEntry(&pEngine->wb_notifications_list, note, pEngine->apiLock, pEngine->pFree); + } + + pEngine->notifications = 0; + /* This method destroys all existing cues, sound banks, and wave banks. * It blocks until all cues are destroyed. */