# HG changeset patch # User giacomo # Date 1166266592 28800 # Node ID de15b9e09d2d7fc6289a9949598c6a60230c2c43 # Parent ac806e416c484a260ecde3c6e8a8b2a32aa3978f [svn] - updated m3u.c, xspf.c, pls.c to use the playlist->mutex and no more playlist_get diff -r ac806e416c48 -r de15b9e09d2d ChangeLog --- 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 + 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 revision [840] - don't use deprecated function playlist_get(). diff -r ac806e416c48 -r de15b9e09d2d src/m3u/m3u.c --- 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); } diff -r ac806e416c48 -r de15b9e09d2d src/pls/pls.c --- 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); } diff -r ac806e416c48 -r de15b9e09d2d src/xspf/xspf.c --- 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);