changeset 1410:cc6203a8cc9f

Switched to new threading model
author Christian Birchinger <joker@netswarm.net>
date Mon, 06 Aug 2007 00:58:12 +0200
parents 32aaec642cf8
children 394738ae11dc
files src/adplug/adplug-xmms.cc
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/adplug/adplug-xmms.cc	Sun Aug 05 19:50:25 2007 +0200
+++ b/src/adplug/adplug-xmms.cc	Mon Aug 06 00:58:12 2007 +0200
@@ -724,7 +724,7 @@
   if (!fd)
   {
     plr.playing = false;
-    g_thread_exit (NULL);
+    return (NULL);
   }
 
   // Try to load module
@@ -734,7 +734,7 @@
     dbg_printf ("error!\n");
     // MessageBox("AdPlug :: Error", "File could not be opened!", "Ok");
     plr.playing = false;
-    g_thread_exit (NULL);
+    return (NULL);
   }
 
   // Cache song length
@@ -851,7 +851,6 @@
   plr.playing = false;          // important! XMMS won't get a self-ended song without it.
   dbg_printf (".\n");
   vfs_fclose (fd);
-  g_thread_exit (NULL);
   return (NULL);
 }
 
@@ -987,9 +986,10 @@
   plr.time_ms = 0.0f;
   plr.seek = -1;
 
-  // start player thread
-  dbg_printf ("create");
-  plr.play_thread = g_thread_create (play_loop, playback, TRUE, NULL);
+  // start player func
+  dbg_printf ("play");
+  plr.play_thread =  g_thread_self();
+  play_loop(playback);
   dbg_printf (".\n");
 }