changeset 1273:463729c87300

branch merge
author Ralf Ertzinger <ralf@skytale.net>
date Sun, 15 Jul 2007 15:00:46 +0200
parents 47559538ce3d (current diff) 173a67e7e4f8 (diff)
children bcf6dc9564f4
files
diffstat 8 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/cue/cuesheet.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/cue/cuesheet.c	Sun Jul 15 15:00:46 2007 +0200
@@ -388,7 +388,9 @@
 #ifdef DEBUG
     g_print("do_setpos: pos = %d\n\n", pos);
 #endif
+    gdk_threads_enter();
     playlist_set_position(playlist, (guint)pos);
+    gdk_threads_leave();
     g_thread_exit(NULL);
     return NULL; //dummy
 }
--- a/src/filewriter/filewriter.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/filewriter/filewriter.c	Sun Jul 15 15:00:46 2007 +0200
@@ -254,7 +254,7 @@
     else
         directory = g_strdup(file_path);
 
-    temp = g_strdup_printf("%s/%s.%s",
+    temp = g_strdup_printf("file://%s/%s.%s",
                            directory, filename, fileext_str[fileext]);
     g_free(directory);
     g_free(filename);
--- a/src/filewriter/flac.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/filewriter/flac.c	Sun Jul 15 15:00:46 2007 +0200
@@ -191,7 +191,7 @@
 static gint flac_get_written_time(void)
 {
     if (input.frequency && input.channels)
-        return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels));
+        return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels) + offset);
 
     return 0;
 }
--- a/src/filewriter/vorbis.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/filewriter/vorbis.c	Sun Jul 15 15:00:46 2007 +0200
@@ -222,7 +222,7 @@
 static gint vorbis_get_written_time(void)
 {
     if (input.frequency && input.channels)
-        return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels));
+        return (gint) ((olen * 1000) / (input.frequency * 2 * input.channels) + offset);
 
     return 0;
 }
--- a/src/filewriter/wav.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/filewriter/wav.c	Sun Jul 15 15:00:46 2007 +0200
@@ -113,6 +113,6 @@
 static gint wav_get_written_time(void)
 {
     if (header.byte_p_sec != 0)
-        return (gint) ((written * 1000) / header.byte_p_sec);
+        return (gint) ((written * 1000) / header.byte_p_sec + offset);
     return 0;
 }
--- a/src/m3u/m3u.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/m3u/m3u.c	Sun Jul 15 15:00:46 2007 +0200
@@ -156,13 +156,14 @@
     gchar *outstr = NULL;
     VFSFile *file;
     Playlist *playlist = playlist_get_active();
-    gchar *fn;
+    gchar *fn = NULL;
 
     g_return_if_fail(filename != NULL);
     g_return_if_fail(playlist != NULL);
 
-    file = vfs_fopen(filename, "wb");
-
+    fn = g_filename_to_uri(filename, NULL, NULL);
+    file = vfs_fopen(fn ? fn : filename, "wb");
+    g_free(fn); fn = NULL;
     g_return_if_fail(file != NULL);
 
     if (cfg.use_pl_metadata)
@@ -194,8 +195,7 @@
         fn = g_filename_from_uri(entry->filename, NULL, NULL);
         vfs_fprintf(file, "%s\n", fn ? fn : entry->filename);
 
-        if (fn)
-            g_free(fn);
+        g_free(fn); fn = NULL;
     }
 
     PLAYLIST_UNLOCK(playlist->mutex);
--- a/src/tta/libtta.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/tta/libtta.c	Sun Jul 15 15:00:46 2007 +0200
@@ -235,11 +235,17 @@
 		    playback->output->flush (seek_position * SEEK_STEP);
 		    seek_position = -1;
 		}
+		if(!playing)
+			goto DONE;
 	    }
 
 	    playback->output->buffer_free ();
 	    playback->output->buffer_free ();
-	    xmms_usleep(10000);
+	    while (playback->output->buffer_playing()) {
+		    xmms_usleep(10000);
+		    if(!playing)
+			    goto DONE;
+	    }
 	}
 
 DONE:
--- a/src/xspf/xspf.c	Sun Jul 15 15:00:10 2007 +0200
+++ b/src/xspf/xspf.c	Sun Jul 15 15:00:46 2007 +0200
@@ -112,13 +112,16 @@
             gchar *str = (gchar *)xmlNodeGetContent(nptr);
             gchar *tmp;
 
+#if 0
             if(!is_remote(str)) {   /* local file */
                 tmp = (gchar *)xmlURIUnescapeString(str, -1, NULL);
             }
             else {              /* streaming */
                 tmp = g_strdup(str);
             }
-
+#else
+            tmp = g_strdup(str); // XXX
+#endif
             location = g_strdup_printf("%s%s", base ? base : "", tmp);
 
             xmlFree(str);