changeset 386:de15b9e09d2d trunk

[svn] - updated m3u.c, xspf.c, pls.c to use the playlist->mutex and no more playlist_get
author giacomo
date Sat, 16 Dec 2006 02:56:32 -0800
parents ac806e416c48
children 0c50f248ed10
files ChangeLog src/m3u/m3u.c src/pls/pls.c src/xspf/xspf.c
diffstat 4 files changed, 16 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Dec 15 21:24:10 2006 -0800
+++ b/ChangeLog	Sat Dec 16 02:56:32 2006 -0800
@@ -1,3 +1,11 @@
+2006-12-16 05:24:10 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [842]
+  - some improvements for chiptune expansion efficiency
+  
+  trunk/src/console/Audacious_Driver.cxx |    8 ++++----
+  1 file changed, 4 insertions(+), 4 deletions(-)
+
+
 2006-12-16 05:23:09 +0000  William Pitcock <nenolod@nenolod.net>
   revision [840]
   - don't use deprecated function playlist_get().
--- a/src/m3u/m3u.c	Fri Dec 15 21:24:10 2006 -0800
+++ b/src/m3u/m3u.c	Sat Dec 16 02:56:32 2006 -0800
@@ -156,7 +156,7 @@
     if (cfg.use_pl_metadata)
         vfs_fprintf(file, "#EXTM3U\n");
 
-    PLAYLIST_LOCK();
+    PLAYLIST_LOCK(playlist->mutex);
 
     for (node = playlist->entries; node; node = g_list_next(node)) {
         PlaylistEntry *entry = PLAYLIST_ENTRY(node->data);
@@ -182,7 +182,7 @@
         vfs_fprintf(file, "%s\n", entry->filename);
     }
 
-    PLAYLIST_UNLOCK();
+    PLAYLIST_UNLOCK(playlist->mutex);
 
     vfs_fclose(file);
 }
--- a/src/pls/pls.c	Fri Dec 15 21:24:10 2006 -0800
+++ b/src/pls/pls.c	Sat Dec 16 02:56:32 2006 -0800
@@ -96,16 +96,16 @@
     vfs_fprintf(file, "[playlist]\n");
     vfs_fprintf(file, "NumberOfEntries=%d\n", playlist_get_length(playlist));
 
-    PLAYLIST_LOCK();
+    PLAYLIST_LOCK(playlist->mutex);
 
-    for (node = playlist_get(); node; node = g_list_next(node)) {
+    for (node = playlist->entries; node; node = g_list_next(node)) {
         PlaylistEntry *entry = PLAYLIST_ENTRY(node->data);
 
         vfs_fprintf(file, "File%d=%s\n", g_list_position(playlist->entries, node) + 1,
                   entry->filename);
     }
 
-    PLAYLIST_UNLOCK();
+    PLAYLIST_UNLOCK(playlist->mutex);
 
     vfs_fclose(file);
 }
--- a/src/xspf/xspf.c	Fri Dec 15 21:24:10 2006 -0800
+++ b/src/xspf/xspf.c	Sat Dec 16 02:56:32 2006 -0800
@@ -220,7 +220,7 @@
 	xmlDocPtr doc;
 	xmlNodePtr rootnode, tmp, tracklist;
 	GList *node;
-	Playlist *playlist = playlist_get_active();
+        Playlist *playlist = playlist_get_active();
 
 	doc = xmlNewDoc("1.0");
 
@@ -236,7 +236,7 @@
 	tracklist = xmlNewNode(NULL, "trackList");
 	xmlAddChild(rootnode, tracklist);
 
-	PLAYLIST_LOCK();
+	PLAYLIST_LOCK(playlist->mutex);
 
 	for (node = playlist->entries; node != NULL; node = g_list_next(node))
 	{
@@ -373,7 +373,7 @@
 		filename = NULL;
 	}
 
-	PLAYLIST_UNLOCK();
+	PLAYLIST_UNLOCK(playlist->mutex);
 
 	xmlSaveFormatFile(filename, doc, 1);
 	xmlFreeDoc(doc);