[Scummvm-git-logs] scummvm master -> e5501c7be43ff369b2d6be0d9cec7ce8e224fdce

mduggan mgithub at guarana.org
Fri May 1 04:27:46 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e5501c7be4 BASE: Move CoreMIDI to end of list to speed up finding the right device (#2193)


Commit: e5501c7be43ff369b2d6be0d9cec7ce8e224fdce
    https://github.com/scummvm/scummvm/commit/e5501c7be43ff369b2d6be0d9cec7ce8e224fdce
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-05-01T13:27:43+09:00

Commit Message:
BASE: Move CoreMIDI to end of list to speed up finding the right device (#2193)

CoreMIDI provides hardware midi device support.

On my MacBook, the first call to MIDIGetNumberOfDestinations() takes around 2
seconds.  Using one of the midi devices lower on the plugin list (mt32,
fluidsynth, etc) takes 2 extra seconds on every game start as
MidiDriver::getDeviceHandle() enumerates all the plugins to find the right one.

This change simply moves CoreMIDI to the bottom of the list.  It will still
take 2 extra seconds when opening the options box, but that's a rare operation
relative to starting games.

Changed paths:
    base/plugins.cpp


diff --git a/base/plugins.cpp b/base/plugins.cpp
index cb9d172d0b..c3ee99e6b6 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -116,7 +116,6 @@ public:
 		#endif
 		#if defined(MACOSX)
 		LINK_PLUGIN(COREAUDIO)
-		LINK_PLUGIN(COREMIDI)
 		#endif
 		#ifdef USE_FLUIDSYNTH
 		LINK_PLUGIN(FLUIDSYNTH)
@@ -141,6 +140,11 @@ public:
 		#if defined(USE_TIMIDITY)
 		LINK_PLUGIN(TIMIDITY)
 		#endif
+		#if defined(MACOSX)
+		// Keep this at the end of the list - it takes a long time to enumerate
+		// and is only for hardware midi devices
+		LINK_PLUGIN(COREMIDI)
+		#endif
 
 		return pl;
 	}




More information about the Scummvm-git-logs mailing list