changeset 2275:e09d9633d6aa

- mp3_playing() should return 0 for now otherwise mp4 playback would halt at the end of a track. - make use of AUDDBG().
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 01 Jan 2008 22:54:10 +0900
parents d9706e29e968
children d25cd7e7eddb
files src/filewriter/mp3.c
diffstat 1 files changed, 7 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/filewriter/mp3.c	Mon Dec 31 19:45:28 2007 +0100
+++ b/src/filewriter/mp3.c	Tue Jan 01 22:54:10 2008 +0900
@@ -20,6 +20,8 @@
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/* #define AUD_DEBUG 1 */
+
 #include "plugins.h"
 
 #ifdef FILEWRITER_MP3
@@ -156,8 +158,6 @@
     (void) vfprintf(stdout, format, ap);
 }
 
-
-
 static void mp3_init(void)
 {
     ConfigDb *db = aud_cfg_db_open();
@@ -206,9 +206,9 @@
 
     if (tuple) {
         /* XXX write UTF-8 even though libmp3lame does id3v2.3. --yaz */
-#ifdef DEBUG
-        g_print("track_name = %s\n", aud_tuple_get_string(tuple, FIELD_TITLE, NULL));
-#endif
+
+        AUDDBG("track_name = %s\n", aud_tuple_get_string(tuple, FIELD_TITLE, NULL));
+
         lameid3.track_name = g_strdup(aud_tuple_get_string(tuple, FIELD_TITLE, NULL));
         id3tag_set_title(gfp, lameid3.track_name);
 
@@ -244,9 +244,7 @@
     lame_set_bWriteVbrTag(gfp, toggle_xing_val);
     lame_set_quality(gfp, algo_quality_val);
     if (audio_mode_val != 4) {
-#ifdef DEBUG
-        printf("set mode to %d\n", audio_mode_val);
-#endif
+        AUDDBG("set mode to %d\n", audio_mode_val);
         lame_set_mode(gfp, audio_mode_val);
     }
     if(auto_ms_val)
@@ -328,10 +326,7 @@
 
 static gint mp3_playing(void)
 {
-#ifdef DEBUG
-    printf("lame: buffer_playing = %d\n", encout ? 1 : 0);
-#endif
-    return encout ? 1 : 0;
+    return 0;
 }
 
 static gint mp3_get_written_time(void)