# HG changeset patch # User William Pitcock # Date 1185230980 18000 # Node ID 833a7d4ea0636c14fa2ab55e7e4e73ae90b0acb6 # Parent d427f353e3267b94e1de13a8ab1310f651267527 modplug: new threading model diff -r d427f353e326 -r 833a7d4ea063 src/modplug/modplugbmp.cxx --- a/src/modplug/modplugbmp.cxx Mon Jul 23 17:44:21 2007 -0500 +++ b/src/modplug/modplugbmp.cxx Mon Jul 23 17:49:40 2007 -0500 @@ -221,12 +221,6 @@ return false; } -void* ModplugXMMS::PlayThread(void* arg) -{ - ((ModplugXMMS*)arg)->PlayLoop(); - return NULL; -} - void ModplugXMMS::PlayLoop() { uint32 lLength; @@ -316,8 +310,6 @@ mPaused = false; mStopped = true; - - g_thread_exit(NULL); } void ModplugXMMS::PlayFile(const string& aFilename) @@ -453,12 +445,8 @@ mModProps.mChannels ); - mDecodeThread = g_thread_create( - (GThreadFunc)PlayThread, - this, - TRUE, - NULL - ); + mDecodeThread = g_thread_self(); + this->PlayLoop(); } void ModplugXMMS::Stop(void)