comparison src/tta/libtta.c @ 1521:fc246407b2ad

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author William Pitcock <nenolod@atheme-project.org>
date Thu, 23 Aug 2007 20:32:48 -0500
parents 3f4a74858aa0
children c98e16576bfb d158ce84fda7
comparison
equal deleted inserted replaced
1520:2ed7413c199a 1521:fc246407b2ad
70 static void seek (InputPlayback *playback, int sec); 70 static void seek (InputPlayback *playback, int sec);
71 static void get_song_info (char *filename, char **title, int *length); 71 static void get_song_info (char *filename, char **title, int *length);
72 static void file_info (char *filename); 72 static void file_info (char *filename);
73 static void about (); 73 static void about ();
74 static Tuple *get_song_tuple(char *filename); 74 static Tuple *get_song_tuple(char *filename);
75 static gchar *extname(const char *filename); 75 //static gchar *extname(const char *filename);
76 76
77 static GThread *decode_thread = NULL; 77 static GThread *decode_thread = NULL;
78 static char sample_buffer[PCM_BUFFER_LENGTH * MAX_BSIZE * MAX_NCH]; 78 static char sample_buffer[PCM_BUFFER_LENGTH * MAX_BSIZE * MAX_NCH];
79 static tta_info info; // currently playing file info 79 static tta_info info; // currently playing file info
80 static int seek_position = -1; 80 static int seek_position = -1;
175 } 175 }
176 176
177 static gchar * 177 static gchar *
178 get_song_title(Tuple *tuple) 178 get_song_title(Tuple *tuple)
179 { 179 {
180 return tuple_formatter_process_string(tuple, get_gentitle_format()); 180 return tuple_formatter_make_title_string(tuple, get_gentitle_format());
181 } 181 }
182 182
183 static void 183 static void
184 get_song_info (char *filename, char **title, int *length) 184 get_song_info (char *filename, char **title, int *length)
185 { 185 {
568 get_song_tuple(char *filename) 568 get_song_tuple(char *filename)
569 { 569 {
570 Tuple *tuple = NULL; 570 Tuple *tuple = NULL;
571 tta_info *ttainfo; 571 tta_info *ttainfo;
572 VFSFile *file; 572 VFSFile *file;
573 gchar *realfn = NULL;
574 573
575 ttainfo = g_malloc0(sizeof(tta_info)); 574 ttainfo = g_malloc0(sizeof(tta_info));
576 575
577 if((file = vfs_fopen(filename, "rb")) != NULL) { 576 if((file = vfs_fopen(filename, "rb")) != NULL) {
578 if(open_tta_file(filename, ttainfo, 0) >= 0) { 577 if(open_tta_file(filename, ttainfo, 0) >= 0) {
608 vfs_fclose(file); 607 vfs_fclose(file);
609 } 608 }
610 return tuple; 609 return tuple;
611 } 610 }
612 611
612 #if 0
613 static gchar * 613 static gchar *
614 extname(const char *filename) 614 extname(const char *filename)
615 { 615 {
616 gchar *ext = strrchr(filename, '.'); 616 gchar *ext = strrchr(filename, '.');
617 617
618 if (ext != NULL) 618 if (ext != NULL)
619 ++ext; 619 ++ext;
620 620
621 return ext; 621 return ext;
622 } 622 }
623 #endif
623 624
624 /* return length in letters */ 625 /* return length in letters */
625 size_t tta_ucs4len(id3_ucs4_t *ucs) 626 size_t tta_ucs4len(id3_ucs4_t *ucs)
626 { 627 {
627 id3_ucs4_t *ptr = ucs; 628 id3_ucs4_t *ptr = ucs;