Skip to content

Commit 27bf4db

Browse files
committed
FACT: Allow final destroy notifications to send before unregistering
1 parent 6e94a37 commit 27bf4db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/FACT.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,6 @@ uint32_t FACTAudioEngine_ShutDown(FACTAudioEngine *pEngine)
456456
send_queued_wavebank_notifications(pEngine);
457457
pEngine->pFree(pEngine->prepared_wavebanks);
458458

459-
pEngine->pFree(pEngine->notifications);
460-
pEngine->notification_count = 0;
461-
pEngine->notifications_capacity = 0;
462-
463459
/* This method destroys all existing cues, sound banks, and wave banks.
464460
* It blocks until all cues are destroyed.
465461
*/
@@ -472,6 +468,10 @@ uint32_t FACTAudioEngine_ShutDown(FACTAudioEngine *pEngine)
472468
FACTSoundBank_Destroy((FACTSoundBank*) pEngine->sbList->entry);
473469
}
474470

471+
pEngine->pFree(pEngine->notifications);
472+
pEngine->notification_count = 0;
473+
pEngine->notifications_capacity = 0;
474+
475475
/* Category data */
476476
for (i = 0; i < pEngine->categoryCount; i += 1)
477477
{

0 commit comments

Comments
 (0)