MIDI render thread was nice 0, should be nice -16.
Seems like a recent change sets the thread priority to 0. Previously it
inherited priority from the parent thread. This change sets the MIDI
render thread priority to the default for audio threads.
Reference bug 1800905
diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp
index d03caa5..e9cbb97 100644
--- a/media/libmediaplayerservice/MidiFile.cpp
+++ b/media/libmediaplayerservice/MidiFile.cpp
@@ -89,7 +89,7 @@
// create playback thread
{
Mutex::Autolock l(mMutex);
- createThreadEtc(renderThread, this, "midithread");
+ createThreadEtc(renderThread, this, "midithread", ANDROID_PRIORITY_AUDIO);
mCondition.wait(mMutex);
LOGV("thread started");
}