changeset 1367:c75fd6894758

wav-sndfile, wav: convert to new threading model
author William Pitcock <nenolod@atheme-project.org>
date Wed, 25 Jul 2007 16:06:17 -0500
parents cf46ed0ee590
children f611c44cc67b
files src/wav/wav-sndfile.c src/wav/wav.c
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/wav/wav-sndfile.c	Mon Jul 23 19:20:21 2007 -0500
+++ b/src/wav/wav-sndfile.c	Wed Jul 25 16:06:17 2007 -0500
@@ -275,8 +275,8 @@
 
 	playback->playing = TRUE;
 
-	decode_thread = g_thread_create ((GThreadFunc)play_loop, playback, TRUE, NULL);
-
+	decode_thread = g_thread_self();
+        play_loop(playback);
 }
 
 static void
--- a/src/wav/wav.c	Mon Jul 23 19:20:21 2007 -0500
+++ b/src/wav/wav.c	Wed Jul 25 16:06:17 2007 -0500
@@ -303,8 +303,6 @@
 
     }
     vfs_fclose(wav_file->file);
-
-    g_thread_exit(NULL);
     return NULL;
 }
 
@@ -422,7 +420,8 @@
                         wav_file->samples_per_sec, wav_file->channels);
         g_free(name);
         wav_file->seek_to = -1;
-        decode_thread = g_thread_create(play_loop, playback, TRUE, NULL);
+        decode_thread = g_thread_self();
+        play_loop(playback);
     }
 }