Mercurial > audlegacy-plugins
changeset 1351:833a7d4ea063
modplug: new threading model
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Mon, 23 Jul 2007 17:49:40 -0500 |
parents | d427f353e326 |
children | ab66f3ee7a11 |
files | src/modplug/modplugbmp.cxx |
diffstat | 1 files changed, 2 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- 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)