scummvm/engines/sci/sound
sluicebox 3d624cf8aa SCI: Don't poll input events from MIDI thread
In March, b67c2d72d6 moved some MIDI
initialization from the main thread to the MIDI thread. This caused
MidiPlayer_Midi::sysEx() to run on the MIDI thread for the first time.
This is a problem because it calls SciEngine:sleep(), which polls
events, and that causes MacOS to throw an exception for calling
SDL_PollEvent() on a non-main thread.

While investigating, it also turns out that MidiPlayer_Midi::sysEx()
and MidiPlayer_Fb01::sysEx() were calling OSystem::updateScreen(),
and that also shouldn't be happening on a non-main thread.

Now SciEngine::sleep() is only called on the main thread, and
OSystem::delayMillis() is called on the MIDI timer thread.
Continuing to call sleep() on the main thread keeps the UI responsive
when loading patches, which can take several seconds.
The OSystem::updateScreen() calls had no effect and have been removed.

Fixes bug #12947
2021-09-21 16:37:24 -05:00
..
decoders
drivers SCI: Don't poll input events from MIDI thread 2021-09-21 16:37:24 -05:00
audio.cpp SCI: Remove AIFF handling from SCI16 code 2021-06-10 14:28:15 -06:00
audio.h
audio32.cpp JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
audio32.h
midiparser_sci.cpp SCI: (SCI0 sound) - fix sound restoring 2021-03-13 17:41:54 +02:00
midiparser_sci.h
music.cpp SCI: Fix corruption when "prefer_digitalsfx" is false 2021-06-14 16:58:40 -05:00
music.h SCI: (SCI0 sound) - ensure that pauseAll() works correctly 2021-03-13 17:41:54 +02:00
soundcmd.cpp SCI: Improve SQ4CD selection of digital samples 2021-05-18 18:33:55 -06:00
soundcmd.h
sync.cpp
sync.h