Skip to content

Commit

Permalink
Bring back midiOutPrepareHeader(), but check for ASan
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 6, 2024
1 parent 5d2dbb1 commit d9cd45c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/i_winmusic.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,20 @@ void I_Windows_UnregisterSong(void)

void I_Windows_ShutdownMusic(void)
{
#if !defined(__SANITIZE_ADDRESS__)
MMRESULT mmr;
#endif

I_Windows_StopSong();
I_Windows_UnregisterSong();

//midiOutUnprepareHeader((HMIDIOUT)hMidiStream, &buffer.MidiStreamHdr, sizeof(MIDIHDR));
#if !defined(__SANITIZE_ADDRESS__)
if ((mmr = midiOutUnprepareHeader((HMIDIOUT)hMidiStream, &buffer.MidiStreamHdr, sizeof(MIDIHDR))) != MMSYSERR_NOERROR)
{
MidiErrorMessage(mmr);
return;
}
#endif

midiStreamClose(hMidiStream);

Expand Down

0 comments on commit d9cd45c

Please sign in to comment.