MidiFile uses C++ Thread not createThreadEtc
This permits leveraging future improvements to Thread.
Change-Id: I323b709e935c47fa3c6041cb8b82fda994e78b56
diff --git a/media/libmediaplayerservice/MidiFile.cpp b/media/libmediaplayerservice/MidiFile.cpp
index 85b1f9d..4946956 100644
--- a/media/libmediaplayerservice/MidiFile.cpp
+++ b/media/libmediaplayerservice/MidiFile.cpp
@@ -86,7 +86,8 @@
// create playback thread
{
Mutex::Autolock l(mMutex);
- createThreadEtc(renderThread, this, "midithread", ANDROID_PRIORITY_AUDIO);
+ mThread = new MidiFileThread(this);
+ mThread->run("midithread", ANDROID_PRIORITY_AUDIO);
mCondition.wait(mMutex);
ALOGV("thread started");
}
@@ -427,11 +428,6 @@
return NO_ERROR;
}
-int MidiFile::renderThread(void* p) {
-
- return ((MidiFile*)p)->render();
-}
-
int MidiFile::render() {
EAS_RESULT result = EAS_FAILURE;
EAS_I32 count;