# HG changeset patch # User William Pitcock # Date 1191734579 18000 # Node ID 5fa26178eaefc69d2edf75163aa097d847e4d380 # Parent f86cb7fc1d4fccfa57b7f1edaba4855229c91115 s/tuple_/aud_tuple_/g diff -r f86cb7fc1d4f -r 5fa26178eaef src/aac/libmp4.c --- a/src/aac/libmp4.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/aac/libmp4.c Sun Oct 07 00:22:59 2007 -0500 @@ -314,22 +314,22 @@ { } -static Tuple *mp4_get_song_tuple_base(char *filename, VFSFile *mp4fh) +static Tuple *mp4_get_song_aud_tuple_base(char *filename, VFSFile *mp4fh) { mp4ff_callback_t *mp4cb = g_malloc0(sizeof(mp4ff_callback_t)); mp4ff_t *mp4file; - Tuple *ti = tuple_new_from_filename(filename); + Tuple *ti = aud_tuple_new_from_filename(filename); /* check if this file is an ADTS stream, if so return a blank tuple */ if (parse_aac_stream(mp4fh)) { g_free(mp4cb); - tuple_associate_string(ti, FIELD_TITLE, NULL, vfs_get_metadata(mp4fh, "track-name")); - tuple_associate_string(ti, FIELD_ALBUM, NULL, vfs_get_metadata(mp4fh, "stream-name")); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, vfs_get_metadata(mp4fh, "track-name")); + aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, vfs_get_metadata(mp4fh, "stream-name")); - tuple_associate_string(ti, FIELD_CODEC, NULL, "Advanced Audio Coding (AAC)"); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Advanced Audio Coding (AAC)"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); vfs_fclose(mp4fh); return ti; @@ -385,45 +385,45 @@ faacDecClose(decoder); msDuration = ((float)numSamples * (float)(framesize - 1.0)/(float)samplerate) * 1000; - tuple_associate_int(ti, FIELD_LENGTH, NULL, msDuration); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, msDuration); mp4ff_meta_get_title(mp4file, &tmpval); if (tmpval) { - tuple_associate_string(ti, FIELD_TITLE, NULL, tmpval); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmpval); free(tmpval); } mp4ff_meta_get_album(mp4file, &tmpval); if (tmpval) { - tuple_associate_string(ti, FIELD_ALBUM, NULL, tmpval); + aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, tmpval); free(tmpval); } mp4ff_meta_get_artist(mp4file, &tmpval); if (tmpval) { - tuple_associate_string(ti, FIELD_ARTIST, NULL, tmpval); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, tmpval); free(tmpval); } mp4ff_meta_get_genre(mp4file, &tmpval); if (tmpval) { - tuple_associate_string(ti, FIELD_GENRE, NULL, tmpval); + aud_tuple_associate_string(ti, FIELD_GENRE, NULL, tmpval); free(tmpval); } mp4ff_meta_get_date(mp4file, &tmpval); if (tmpval) { - tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(tmpval)); + aud_tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(tmpval)); free(tmpval); } - tuple_associate_string(ti, FIELD_CODEC, NULL, "Advanced Audio Coding (AAC)"); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Advanced Audio Coding (AAC)"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); free (mp4cb); vfs_fclose(mp4fh); @@ -441,7 +441,7 @@ mp4fh = remote ? vfs_buffered_file_new_from_uri(filename) : vfs_fopen(filename, "rb"); - tuple = mp4_get_song_tuple_base(filename, mp4fh); + tuple = mp4_get_song_aud_tuple_base(filename, mp4fh); return tuple; } @@ -457,9 +457,9 @@ gchar *title; Tuple *tuple = mp4_get_song_tuple(filename); - title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); - tuple_free(tuple); + aud_tuple_free(tuple); return title; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/adplug/adplug-xmms.cc --- a/src/adplug/adplug-xmms.cc Wed Oct 03 17:24:59 2007 +0200 +++ b/src/adplug/adplug-xmms.cc Sun Oct 07 00:22:59 2007 -0500 @@ -690,18 +690,18 @@ if (p) { - Tuple *ti = tuple_new_from_filename(filename); + Tuple *ti = aud_tuple_new_from_filename(filename); if (! p->getauthor().empty()) - tuple_associate_string(ti, FIELD_ARTIST, NULL, p->getauthor().c_str()); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, p->getauthor().c_str()); if (! p->gettitle().empty()) - tuple_associate_string(ti, FIELD_TITLE, NULL, p->gettitle().c_str()); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, p->gettitle().c_str()); else if (! p->getdesc().empty()) - tuple_associate_string(ti, FIELD_TITLE, NULL, p->getdesc().c_str()); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, p->getdesc().c_str()); else - tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(filename)); - tuple_associate_string(ti, FIELD_CODEC, NULL, p->gettype().c_str()); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); - tuple_associate_int(ti, FIELD_LENGTH, NULL, p->songlength (plr.subsong)); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(filename)); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, p->gettype().c_str()); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, p->songlength (plr.subsong)); delete p; return ti; } @@ -711,10 +711,10 @@ static char* format_and_free_ti( Tuple* ti, int* length ) { - char* result = tuple_formatter_make_title_string(ti, get_gentitle_format()); + char* result = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); if ( result ) - *length = tuple_get_int(ti, FIELD_LENGTH, NULL); - tuple_free((void *) ti); + *length = aud_tuple_get_int(ti, FIELD_LENGTH, NULL); + aud_tuple_free((void *) ti); return result; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/alac/plugin.c --- a/src/alac/plugin.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/alac/plugin.c Sun Oct 07 00:22:59 2007 -0500 @@ -119,25 +119,25 @@ return TRUE; } -Tuple *build_tuple_from_demux(demux_res_t *demux_res, char *path) +Tuple *build_aud_tuple_from_demux(demux_res_t *demux_res, char *path) { - Tuple *ti = tuple_new_from_filename(path); + Tuple *ti = aud_tuple_new_from_filename(path); if (demux_res->tuple.art != NULL) - tuple_associate_string(ti, FIELD_ARTIST, NULL, demux_res->tuple.art); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, demux_res->tuple.art); if (demux_res->tuple.nam != NULL) - tuple_associate_string(ti, FIELD_TITLE, NULL, demux_res->tuple.nam); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, demux_res->tuple.nam); if (demux_res->tuple.alb != NULL) - tuple_associate_string(ti, FIELD_ALBUM, NULL, demux_res->tuple.alb); + aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, demux_res->tuple.alb); if (demux_res->tuple.gen != NULL) - tuple_associate_string(ti, FIELD_GENRE, NULL, demux_res->tuple.gen); + aud_tuple_associate_string(ti, FIELD_GENRE, NULL, demux_res->tuple.gen); if (demux_res->tuple.cmt != NULL) - tuple_associate_string(ti, FIELD_COMMENT, NULL, demux_res->tuple.cmt); + aud_tuple_associate_string(ti, FIELD_COMMENT, NULL, demux_res->tuple.cmt); if (demux_res->tuple.day != NULL) - tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(demux_res->tuple.day)); + aud_tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(demux_res->tuple.day)); - tuple_associate_string(ti, FIELD_CODEC, NULL, "Apple Lossless (ALAC)"); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless"); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Apple Lossless (ALAC)"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless"); return ti; } @@ -171,7 +171,7 @@ stream_destroy(input_stream); vfs_fclose(input_file); - return build_tuple_from_demux(&demux_res, filename); + return build_aud_tuple_from_demux(&demux_res, filename); } static InputPlayback *playback; @@ -337,8 +337,8 @@ demux_res.stream = input_stream; /* Get the titlestring ready. */ - ti = build_tuple_from_demux(&demux_res, (char *) args); - title = tuple_formatter_make_title_string(ti, get_gentitle_format()); + ti = build_aud_tuple_from_demux(&demux_res, (char *) args); + title = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); /* initialise the sound converter */ demux_res.alac = create_alac(demux_res.sample_size, demux_res.num_channels); diff -r f86cb7fc1d4f -r 5fa26178eaef src/cdaudio-ng/cdaudio-ng.c --- a/src/cdaudio-ng/cdaudio-ng.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/cdaudio-ng/cdaudio-ng.c Sun Oct 07 00:22:59 2007 -0500 @@ -84,7 +84,7 @@ static Tuple *cdaudio_get_song_tuple(gchar *filename); static void menu_click(); -static Tuple *create_tuple_from_trackinfo(char *filename); +static Tuple *create_aud_tuple_from_trackinfo(char *filename); static void dae_play_loop(dae_params_t *pdae_params); static int calculate_track_length(int startlsn, int endlsn); static int find_trackno_from_filename(char *filename); @@ -507,12 +507,12 @@ playing_track = trackno; is_paused = FALSE; - tuple = create_tuple_from_trackinfo(pinputplayback->filename); - title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + tuple = create_aud_tuple_from_trackinfo(pinputplayback->filename); + title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); inputplugin.set_info(title, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn), 1411200, 44100, 2); g_free(title); - tuple_free(tuple); + aud_tuple_free(tuple); if (use_dae) { CDDEBUG("using digital audio extraction\n"); @@ -746,11 +746,11 @@ CDDEBUG("cdaudio_get_song_info(\"%s\")\n", filename); gint trackno = find_trackno_from_filename(filename); - Tuple *tuple = create_tuple_from_trackinfo(filename); + Tuple *tuple = create_aud_tuple_from_trackinfo(filename); if(tuple) { - *title = tuple_formatter_process_string(tuple, get_gentitle_format()); - tuple_free(tuple); + *title = aud_tuple_formatter_process_string(tuple, get_gentitle_format()); + aud_tuple_free(tuple); tuple = NULL; } *length = calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn); @@ -760,7 +760,7 @@ { CDDEBUG("cdaudio_get_song_tuple(\"%s\")\n", filename); - return create_tuple_from_trackinfo(filename); + return create_aud_tuple_from_trackinfo(filename); } @@ -797,32 +797,32 @@ g_list_free(list); } -Tuple *create_tuple_from_trackinfo(char *filename) +Tuple *create_aud_tuple_from_trackinfo(char *filename) { if (trackinfo == NULL) return NULL; - Tuple *tuple = tuple_new_from_filename(filename); + Tuple *tuple = aud_tuple_new_from_filename(filename); gint trackno = find_trackno_from_filename(filename); if (trackno < firsttrackno || trackno > lasttrackno) return NULL; if(strlen(trackinfo[trackno].performer)) { - tuple_associate_string(tuple, FIELD_ARTIST, NULL, trackinfo[trackno].performer); + aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, trackinfo[trackno].performer); } if(strlen(trackinfo[0].name)) { - tuple_associate_string(tuple, FIELD_ALBUM, NULL, trackinfo[0].name); + aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, trackinfo[0].name); } if(strlen(trackinfo[trackno].name)) { - tuple_associate_string(tuple, FIELD_TITLE, NULL, trackinfo[trackno].name); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, trackinfo[trackno].name); } - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, trackno); - tuple_associate_string(tuple, -1, "ext", "cda"); //XXX should do? --yaz + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, trackno); + aud_tuple_associate_string(tuple, -1, "ext", "cda"); //XXX should do? --yaz - tuple_associate_int(tuple, FIELD_LENGTH, NULL, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn)); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, calculate_track_length(trackinfo[trackno].startlsn, trackinfo[trackno].endlsn)); if(strlen(trackinfo[trackno].genre)) { - tuple_associate_string(tuple, FIELD_GENRE, NULL, trackinfo[trackno].genre); + aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, trackinfo[trackno].genre); } //tuple->year = 0; todo: set the year diff -r f86cb7fc1d4f -r 5fa26178eaef src/console/Audacious_Driver.cxx --- a/src/console/Audacious_Driver.cxx Wed Oct 03 17:24:59 2007 +0200 +++ b/src/console/Audacious_Driver.cxx Sun Oct 07 00:22:59 2007 -0500 @@ -201,28 +201,28 @@ static Tuple* get_track_ti( const char* path, track_info_t const& info, int track ) { - Tuple* ti = tuple_new(); + Tuple* ti = aud_tuple_new(); if ( ti ) { - tuple_associate_string(ti, FIELD_FILE_NAME, NULL, g_path_get_basename(path)); - tuple_associate_string(ti, FIELD_FILE_PATH, NULL, g_path_get_dirname(path)); - tuple_associate_string(ti, FIELD_ARTIST, NULL, info.author); - tuple_associate_string(ti, FIELD_ALBUM, NULL, info.game); - tuple_associate_string(ti, -1, "game", info.game); - tuple_associate_string(ti, FIELD_TITLE, NULL, info.song ? info.song : g_path_get_basename(path)); + aud_tuple_associate_string(ti, FIELD_FILE_NAME, NULL, g_path_get_basename(path)); + aud_tuple_associate_string(ti, FIELD_FILE_PATH, NULL, g_path_get_dirname(path)); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, info.author); + aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, info.game); + aud_tuple_associate_string(ti, -1, "game", info.game); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, info.song ? info.song : g_path_get_basename(path)); if ( info.track_count > 1 ) { - tuple_associate_int(ti, FIELD_TRACK_NUMBER, NULL, track + 1); - tuple_associate_int(ti, -1, "subsong", track + 1); - tuple_associate_int(ti, FIELD_SUBSONG_ID, NULL, track + 1); - tuple_associate_int(ti, FIELD_SUBSONG_NUM, NULL, info.track_count); + aud_tuple_associate_int(ti, FIELD_TRACK_NUMBER, NULL, track + 1); + aud_tuple_associate_int(ti, -1, "subsong", track + 1); + aud_tuple_associate_int(ti, FIELD_SUBSONG_ID, NULL, track + 1); + aud_tuple_associate_int(ti, FIELD_SUBSONG_NUM, NULL, info.track_count); } - tuple_associate_string(ti, FIELD_COPYRIGHT, NULL, info.copyright); - tuple_associate_string(ti, -1, "console", info.system); - tuple_associate_string(ti, FIELD_CODEC, NULL, info.system); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); - tuple_associate_string(ti, -1, "dumper", info.dumper); - tuple_associate_string(ti, FIELD_COMMENT, NULL, info.comment); + aud_tuple_associate_string(ti, FIELD_COPYRIGHT, NULL, info.copyright); + aud_tuple_associate_string(ti, -1, "console", info.system); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, info.system); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); + aud_tuple_associate_string(ti, -1, "dumper", info.dumper); + aud_tuple_associate_string(ti, FIELD_COMMENT, NULL, info.comment); int length = info.length; if ( length <= 0 ) @@ -231,17 +231,17 @@ length = audcfg.loop_length * 1000; else if ( length >= fade_threshold ) length += fade_length; - tuple_associate_int(ti, FIELD_LENGTH, NULL, length); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, length); } return ti; } static char* format_and_free_ti( Tuple* ti, int* length ) { - char* result = tuple_formatter_make_title_string(ti, get_gentitle_format()); + char* result = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); if ( result ) - *length = tuple_get_int(ti, FIELD_LENGTH, NULL); - tuple_free((void *) ti); + *length = aud_tuple_get_int(ti, FIELD_LENGTH, NULL); + aud_tuple_free((void *) ti); return result; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/cue/cuesheet.c --- a/src/cue/cuesheet.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/cue/cuesheet.c Sun Oct 07 00:22:59 2007 -0500 @@ -44,7 +44,7 @@ static void stop(InputPlayback *data); static void cue_pause(InputPlayback *data, short); static Tuple *get_tuple(gchar *uri); -static Tuple *get_tuple_uri(gchar *uri); +static Tuple *get_aud_tuple_uri(gchar *uri); static void cue_init(void); static void cue_cleanup(void); static gpointer watchdog_func(gpointer data); @@ -213,22 +213,22 @@ if (strncasecmp("cue://", uri, 6)) { gchar *tmp = g_strdup_printf("cue://%s?0", uri); - ret = get_tuple_uri(tmp); + ret = get_aud_tuple_uri(tmp); g_free(tmp); return ret; } - return get_tuple_uri(uri); + return get_aud_tuple_uri(uri); } -static void _tuple_copy_field(Tuple *tuple, Tuple *tuple2, const gint nfield, const gchar *field) +static void _aud_tuple_copy_field(Tuple *tuple, Tuple *tuple2, const gint nfield, const gchar *field) { - const gchar *str = tuple_get_string(tuple, nfield, field); - tuple_disassociate(tuple2, nfield, field); - tuple_associate_string(tuple2, nfield, field, str); + const gchar *str = aud_tuple_get_string(tuple, nfield, field); + aud_tuple_disassociate(tuple2, nfield, field); + aud_tuple_associate_string(tuple2, nfield, field, str); } -static Tuple *get_tuple_uri(gchar *uri) +static Tuple *get_aud_tuple_uri(gchar *uri) { gchar *path2 = g_strdup(uri + 6); gchar *_path = strchr(path2, '?'); @@ -268,28 +268,28 @@ if(!phys_tuple) return NULL; - out = tuple_new(); + out = aud_tuple_new(); - _tuple_copy_field(phys_tuple, out, FIELD_FILE_PATH, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_FILE_NAME, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_FILE_EXT, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_CODEC, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_QUALITY, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_COPYRIGHT, NULL); - _tuple_copy_field(phys_tuple, out, FIELD_COMMENT, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_FILE_PATH, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_FILE_NAME, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_FILE_EXT, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_CODEC, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_QUALITY, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_COPYRIGHT, NULL); + _aud_tuple_copy_field(phys_tuple, out, FIELD_COMMENT, NULL); - tuple_associate_int(out, FIELD_LENGTH, NULL, tuple_get_int(phys_tuple, FIELD_LENGTH, NULL)); + aud_tuple_associate_int(out, FIELD_LENGTH, NULL, aud_tuple_get_int(phys_tuple, FIELD_LENGTH, NULL)); - tuple_free(phys_tuple); + aud_tuple_free(phys_tuple); - tuple_associate_string(out, FIELD_TITLE, NULL, cue_tracks[track].title); - tuple_associate_string(out, FIELD_ARTIST, NULL, cue_tracks[track].performer ? + aud_tuple_associate_string(out, FIELD_TITLE, NULL, cue_tracks[track].title); + aud_tuple_associate_string(out, FIELD_ARTIST, NULL, cue_tracks[track].performer ? cue_tracks[track].performer : cue_performer); - tuple_associate_string(out, FIELD_ALBUM, NULL, cue_title); - tuple_associate_string(out, FIELD_GENRE, NULL, cue_genre); + aud_tuple_associate_string(out, FIELD_ALBUM, NULL, cue_title); + aud_tuple_associate_string(out, FIELD_GENRE, NULL, cue_genre); if(cue_year) - tuple_associate_int(out, FIELD_YEAR, NULL, atoi(cue_year)); - tuple_associate_int(out, FIELD_TRACK_NUMBER, NULL, track + 1); + aud_tuple_associate_int(out, FIELD_YEAR, NULL, atoi(cue_year)); + aud_tuple_associate_int(out, FIELD_TRACK_NUMBER, NULL, track + 1); return out; } @@ -508,8 +508,8 @@ tuple = real_ip->plugin->get_song_tuple(cue_file); if(tuple) { - cue_tracks[last_cue_track].index = tuple_get_int(tuple, FIELD_LENGTH, NULL); - tuple_free(tuple); tuple = NULL; + cue_tracks[last_cue_track].index = aud_tuple_get_int(tuple, FIELD_LENGTH, NULL); + aud_tuple_free(tuple); tuple = NULL; } /* kick watchdog thread */ diff -r f86cb7fc1d4f -r 5fa26178eaef src/dockalbumart/dockalbumart.c --- a/src/dockalbumart/dockalbumart.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/dockalbumart/dockalbumart.c Sun Oct 07 00:22:59 2007 -0500 @@ -83,8 +83,8 @@ gchar *tmp; const gchar *file_path, *file_name; - file_name = tuple_get_string(tuple, FIELD_FILE_NAME, NULL); - file_path = tuple_get_string(tuple, FIELD_FILE_PATH, NULL); + file_name = aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL); + file_path = aud_tuple_get_string(tuple, FIELD_FILE_PATH, NULL); if (file_name != NULL && file_path != NULL) { diff -r f86cb7fc1d4f -r 5fa26178eaef src/filewriter/filewriter.c --- a/src/filewriter/filewriter.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/filewriter/filewriter.c Sun Oct 07 00:22:59 2007 -0500 @@ -203,7 +203,7 @@ if (filenamefromtags) { - gchar *utf8 = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + gchar *utf8 = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); g_strchomp(utf8); //chop trailing ^J --yaz @@ -214,7 +214,7 @@ } if (filename == NULL) { - filename = g_strdup(tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); + filename = g_strdup(aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); if (!use_suffix) if ((temp = strrchr(filename, '.')) != NULL) *temp = '\0'; @@ -225,7 +225,7 @@ if (prependnumber) { - gint number = tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL); + gint number = aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL); if (!tuple || !number) number = pos + 1; @@ -235,7 +235,7 @@ } if (save_original) - directory = tuple_get_string(tuple, FIELD_FILE_PATH, NULL); + directory = aud_tuple_get_string(tuple, FIELD_FILE_PATH, NULL); else directory = file_path; diff -r f86cb7fc1d4f -r 5fa26178eaef src/filewriter/flac.c --- a/src/filewriter/flac.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/filewriter/flac.c Sun Oct 07 00:22:59 2007 -0500 @@ -107,14 +107,14 @@ meta = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_TITLE, NULL), "title=%s"); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_ARTIST, NULL), "artist=%s"); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_ALBUM, NULL), "album=%s"); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_GENRE, NULL), "genre=%s"); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_COMMENT, NULL), "comment=%s"); - INSERT_VORBIS_COMMENT(tuple_get_string(tuple, FIELD_DATE, NULL), "date=%s"); - INSERT_VORBIS_COMMENT(tuple_get_int(tuple, FIELD_YEAR, NULL), "year=%d"); - INSERT_VORBIS_COMMENT(tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL), "tracknumber=%d"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_TITLE, NULL), "title=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_ARTIST, NULL), "artist=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_ALBUM, NULL), "album=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_GENRE, NULL), "genre=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_COMMENT, NULL), "comment=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_string(tuple, FIELD_DATE, NULL), "date=%s"); + INSERT_VORBIS_COMMENT(aud_tuple_get_int(tuple, FIELD_YEAR, NULL), "year=%d"); + INSERT_VORBIS_COMMENT(aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL), "tracknumber=%d"); FLAC__stream_encoder_set_metadata(flac_encoder, &meta, 1); } diff -r f86cb7fc1d4f -r 5fa26178eaef src/filewriter/mp3.c --- a/src/filewriter/mp3.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/filewriter/mp3.c Sun Oct 07 00:22:59 2007 -0500 @@ -207,24 +207,24 @@ if (tuple) { /* XXX write UTF-8 even though libmp3lame does id3v2.3. --yaz */ #ifdef DEBUG - g_print("track_name = %s\n", tuple_get_string(tuple, FIELD_TITLE, NULL)); + g_print("track_name = %s\n", aud_tuple_get_string(tuple, FIELD_TITLE, NULL)); #endif - lameid3.track_name = g_strdup(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); - lameid3.performer = g_strdup(tuple_get_string(tuple, FIELD_ARTIST, NULL)); + lameid3.performer = g_strdup(aud_tuple_get_string(tuple, FIELD_ARTIST, NULL)); id3tag_set_artist(gfp, lameid3.performer); - lameid3.album_name = g_strdup(tuple_get_string(tuple, FIELD_ALBUM, NULL)); + lameid3.album_name = g_strdup(aud_tuple_get_string(tuple, FIELD_ALBUM, NULL)); id3tag_set_album(gfp, lameid3.album_name); - lameid3.genre = g_strdup(tuple_get_string(tuple, FIELD_GENRE, NULL)); + lameid3.genre = g_strdup(aud_tuple_get_string(tuple, FIELD_GENRE, NULL)); id3tag_set_genre(gfp, lameid3.genre); - lameid3.year = g_strdup_printf("%d", tuple_get_int(tuple, FIELD_YEAR, NULL)); + lameid3.year = g_strdup_printf("%d", aud_tuple_get_int(tuple, FIELD_YEAR, NULL)); id3tag_set_year(gfp, lameid3.year); - lameid3.track_number = g_strdup_printf("%d", tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); + lameid3.track_number = g_strdup_printf("%d", aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); id3tag_set_track(gfp, lameid3.track_number); // id3tag_write_v1(gfp); diff -r f86cb7fc1d4f -r 5fa26178eaef src/filewriter/vorbis.c --- a/src/filewriter/vorbis.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/filewriter/vorbis.c Sun Oct 07 00:22:59 2007 -0500 @@ -91,26 +91,26 @@ gchar tmpstr[32]; gint scrint; - if ((scratch = tuple_get_string(tuple, FIELD_TITLE, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_TITLE, NULL))) vorbis_comment_add_tag(&vc, "title", (gchar *) scratch); - if ((scratch = tuple_get_string(tuple, FIELD_ARTIST, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_ARTIST, NULL))) vorbis_comment_add_tag(&vc, "artist", (gchar *) scratch); - if ((scratch = tuple_get_string(tuple, FIELD_ALBUM, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_ALBUM, NULL))) vorbis_comment_add_tag(&vc, "album", (gchar *) scratch); - if ((scratch = tuple_get_string(tuple, FIELD_GENRE, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_GENRE, NULL))) vorbis_comment_add_tag(&vc, "genre", (gchar *) scratch); - if ((scratch = tuple_get_string(tuple, FIELD_DATE, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_DATE, NULL))) vorbis_comment_add_tag(&vc, "date", (gchar *) scratch); - if ((scratch = tuple_get_string(tuple, FIELD_COMMENT, NULL))) + if ((scratch = aud_tuple_get_string(tuple, FIELD_COMMENT, NULL))) vorbis_comment_add_tag(&vc, "comment", (gchar *) scratch); - if ((scrint = tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL))) + if ((scrint = aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL))) { g_snprintf(tmpstr, sizeof(tmpstr), "%d", scrint); vorbis_comment_add_tag(&vc, "tracknumber", tmpstr); } - if ((scrint = tuple_get_int(tuple, FIELD_YEAR, NULL))) + if ((scrint = aud_tuple_get_int(tuple, FIELD_YEAR, NULL))) { g_snprintf(tmpstr, sizeof(tmpstr), "%d", scrint); vorbis_comment_add_tag(&vc, "year", tmpstr); diff -r f86cb7fc1d4f -r 5fa26178eaef src/flacng/tools.c --- a/src/flacng/tools.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/flacng/tools.c Sun Oct 07 00:22:59 2007 -0500 @@ -239,31 +239,31 @@ _DEBUG("Using callback_info %s", info->name); - out = tuple_new_from_filename(filename); + out = aud_tuple_new_from_filename(filename); - tuple_associate_string(out, FIELD_CODEC, NULL, "Free Lossless Audio Codec (FLAC)"); - tuple_associate_string(out, FIELD_CODEC, NULL, "lossless"); + aud_tuple_associate_string(out, FIELD_CODEC, NULL, "Free Lossless Audio Codec (FLAC)"); + aud_tuple_associate_string(out, FIELD_CODEC, NULL, "lossless"); - tuple_associate_string(out, FIELD_ARTIST, NULL, info->comment.artist); - tuple_associate_string(out, FIELD_TITLE, NULL, info->comment.title); - tuple_associate_string(out, FIELD_ALBUM, NULL, info->comment.album); - tuple_associate_string(out, FIELD_GENRE, NULL, info->comment.genre); + aud_tuple_associate_string(out, FIELD_ARTIST, NULL, info->comment.artist); + aud_tuple_associate_string(out, FIELD_TITLE, NULL, info->comment.title); + aud_tuple_associate_string(out, FIELD_ALBUM, NULL, info->comment.album); + aud_tuple_associate_string(out, FIELD_GENRE, NULL, info->comment.genre); if (info->comment.tracknumber != NULL) - tuple_associate_int(out, FIELD_TRACK_NUMBER, NULL, atoi(info->comment.tracknumber)); + aud_tuple_associate_int(out, FIELD_TRACK_NUMBER, NULL, atoi(info->comment.tracknumber)); if (info->comment.date != NULL) - tuple_associate_int(out, FIELD_YEAR, NULL, atoi(info->comment.date)); + aud_tuple_associate_int(out, FIELD_YEAR, NULL, atoi(info->comment.date)); /* * Calculate the stream length (milliseconds) */ if (0 == info->stream.samplerate) { _ERROR("Invalid sample rate for stream!"); - tuple_associate_int(out, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(out, FIELD_LENGTH, NULL, -1); } else { - tuple_associate_int(out, FIELD_LENGTH, NULL, (info->stream.samples / info->stream.samplerate) * 1000); - _DEBUG("Stream length: %d seconds", tuple_get_int(out, FIELD_LENGTH, NULL)); + aud_tuple_associate_int(out, FIELD_LENGTH, NULL, (info->stream.samples / info->stream.samplerate) * 1000); + _DEBUG("Stream length: %d seconds", aud_tuple_get_int(out, FIELD_LENGTH, NULL)); } _DEBUG("Tuple created: [%p]", out); @@ -284,9 +284,9 @@ input = get_tuple(filename, info); - title = tuple_formatter_make_title_string(input, get_gentitle_format()); + title = aud_tuple_formatter_make_title_string(input, get_gentitle_format()); - tuple_free(input); + aud_tuple_free(input); _DEBUG("Title created: <%s>", title); diff -r f86cb7fc1d4f -r 5fa26178eaef src/madplug/decoder.c --- a/src/madplug/decoder.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/madplug/decoder.c Sun Oct 07 00:22:59 2007 -0500 @@ -192,7 +192,7 @@ info->duration = mad_timer_zero; // should be cleared before loop, if we use it as break condition. if(info->fileinfo_request == TRUE) { - tuple_associate_int(info->tuple, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(info->tuple, FIELD_LENGTH, NULL, -1); info->fileinfo_request = FALSE; } @@ -270,10 +270,10 @@ g_message("size = %d", stream.next_frame - stream.this_frame); #endif #endif - if(tuple_get_int(info->tuple, FIELD_LENGTH, NULL) == -1) + if(aud_tuple_get_int(info->tuple, FIELD_LENGTH, NULL) == -1) mad_timer_add(&info->duration, header.duration); else { - gint length = tuple_get_int(info->tuple, FIELD_LENGTH, NULL); + gint length = aud_tuple_get_int(info->tuple, FIELD_LENGTH, NULL); info->duration.seconds = length / 1000; info->duration.fraction = length % 1000; @@ -357,7 +357,7 @@ #ifdef DEBUG g_message("info->frames = %d", info->frames); #endif - if(tuple_get_int(info->tuple, FIELD_LENGTH, NULL) == -1) { + if(aud_tuple_get_int(info->tuple, FIELD_LENGTH, NULL) == -1) { if(xing_bitrate > 0.0) { /* calc duration with xing info */ double tmp = 8 * (double)info->xing.bytes * 1000 / xing_bitrate; @@ -371,7 +371,7 @@ } } else { - gint length = tuple_get_int(info->tuple, FIELD_LENGTH, NULL); + gint length = aud_tuple_get_int(info->tuple, FIELD_LENGTH, NULL); info->duration.seconds = length / 1000; info->duration.fraction = length % 1000; @@ -482,7 +482,7 @@ /* set mainwin title */ if (info->title) g_free(info->title); - info->title = tuple_formatter_make_title_string(info->tuple, audmad_config.title_override == TRUE ? + info->title = aud_tuple_formatter_make_title_string(info->tuple, audmad_config.title_override == TRUE ? audmad_config.id3_format : get_gentitle_format()); tlen = (gint) mad_timer_count(info->duration, MAD_UNITS_MILLISECONDS), @@ -708,7 +708,7 @@ g_message("e: decode"); #endif /* DEBUG */ - tuple_free(info->tuple); + aud_tuple_free(info->tuple); info->tuple = NULL; info->playback->output->close_audio(); diff -r f86cb7fc1d4f -r 5fa26178eaef src/madplug/input.c --- a/src/madplug/input.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/madplug/input.c Sun Oct 07 00:22:59 2007 -0500 @@ -326,8 +326,8 @@ { gchar *scratch = input_id3_get_string(tag, frame); - tuple_associate_string(tuple, nfield, NULL, scratch); - tuple_associate_string(tuple, -1, frame, scratch); + aud_tuple_associate_string(tuple, nfield, NULL, scratch); + aud_tuple_associate_string(tuple, -1, frame, scratch); g_free(scratch); } @@ -337,9 +337,9 @@ Tuple *tuple; if (info->tuple == NULL) { - tuple = tuple_new(); + tuple = aud_tuple_new(); info->tuple = tuple; - tuple_associate_int(info->tuple, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(info->tuple, FIELD_LENGTH, NULL, -1); } } @@ -356,9 +356,9 @@ g_message("f: input_read_tag"); #endif if (info->tuple != NULL) - tuple_free(info->tuple); + aud_tuple_free(info->tuple); - tuple = tuple_new_from_filename(info->filename); + tuple = aud_tuple_new_from_filename(info->filename); info->tuple = tuple; if(info->infile) { @@ -392,7 +392,7 @@ string = input_id3_get_string(info->tag, ID3_FRAME_TRACK); if (string) { - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(string)); g_free(string); string = NULL; } @@ -404,7 +404,7 @@ string = input_id3_get_string(info->tag, "TYER"); if (string) { - tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi(string)); g_free(string); string = NULL; } @@ -412,19 +412,19 @@ // length string = input_id3_get_string(info->tag, "TLEN"); if (string) { - tuple_associate_int(tuple, FIELD_LENGTH, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, atoi(string)); #ifdef DEBUG g_message("input_read_tag: TLEN = %d", atoi(string)); #endif g_free(string); string = NULL; } else - tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); - tuple_associate_string(tuple, FIELD_CODEC, NULL, "MPEG Audio (MP3)"); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "MPEG Audio (MP3)"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); - info->title = tuple_formatter_make_title_string(tuple, audmad_config.title_override == TRUE ? + info->title = aud_tuple_formatter_make_title_string(tuple, audmad_config.title_override == TRUE ? audmad_config.id3_format : get_gentitle_format()); // for connection via proxy, we have to stop transfer once. I can't explain the reason. @@ -452,8 +452,8 @@ g_free(info->title); info->title = NULL; - tuple_disassociate(info->tuple, FIELD_TITLE, NULL); - tuple_disassociate(info->tuple, FIELD_ALBUM, NULL); + aud_tuple_disassociate(info->tuple, FIELD_TITLE, NULL); + aud_tuple_disassociate(info->tuple, FIELD_ALBUM, NULL); tmp = vfs_get_metadata(info->infile, "track-name"); if(tmp){ @@ -461,7 +461,7 @@ gchar *scratch; scratch = str_to_utf8(tmp); - tuple_associate_string(info->tuple, FIELD_TITLE, NULL, scratch); + aud_tuple_associate_string(info->tuple, FIELD_TITLE, NULL, scratch); g_free(scratch); g_free(tmp); @@ -474,8 +474,8 @@ gchar *scratch; scratch = str_to_utf8(tmp); - tuple_associate_string(info->tuple, FIELD_ALBUM, NULL, scratch); - tuple_associate_string(info->tuple, -1, "stream", scratch); + aud_tuple_associate_string(info->tuple, FIELD_ALBUM, NULL, scratch); + aud_tuple_associate_string(info->tuple, -1, "stream", scratch); g_free(scratch); g_free(tmp); @@ -483,7 +483,7 @@ } if (metadata) - tmp = tuple_formatter_process_string(info->tuple, "${?title:${title}}${?stream: (${stream})"); + tmp = aud_tuple_formatter_process_string(info->tuple, "${?title:${title}}${?stream: (${stream})"); else { gchar *realfn = g_filename_from_uri(info->filename, NULL, NULL); gchar *tmp2 = g_path_get_basename(realfn ? realfn : info->filename); // info->filename is uri. --yaz @@ -625,7 +625,7 @@ g_free(info->mp3gain_minmax_str); if (info->tuple) { - tuple_free(info->tuple); + aud_tuple_free(info->tuple); info->tuple = NULL; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/madplug/plugin.c --- a/src/madplug/plugin.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/madplug/plugin.c Sun Oct 07 00:22:59 2007 -0500 @@ -516,12 +516,12 @@ } if (input_get_info(&myinfo, info.remote ? TRUE : audmad_config.fast_play_time_calc) == TRUE) { - if(tuple_get_string(myinfo.tuple, -1, "track-name")) - *title = g_strdup(tuple_get_string(myinfo.tuple, -1, "track-name")); + if(aud_tuple_get_string(myinfo.tuple, -1, "track-name")) + *title = g_strdup(aud_tuple_get_string(myinfo.tuple, -1, "track-name")); else *title = g_strdup(url); - *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL); + *length = aud_tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL); if(*length == -1) *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS); } @@ -553,7 +553,7 @@ } if (input_get_info(&myinfo, info.remote ? TRUE : audmad_config.fast_play_time_calc) == TRUE) { - *length = tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL); + *length = aud_tuple_get_int(myinfo.tuple, FIELD_LENGTH, NULL); if(*length == -1) *length = mad_timer_count(myinfo.duration, MAD_UNITS_MILLISECONDS); } @@ -630,7 +630,7 @@ static void __set_and_free(Tuple *tuple, gint nfield, gchar *name, gchar *value) { - tuple_associate_string(tuple, nfield, name, value); + aud_tuple_associate_string(tuple, nfield, name, value); g_free(value); } @@ -656,7 +656,7 @@ if(info.remote && mad_timer_count(info.duration, MAD_UNITS_SECONDS) <= 0){ if((fd && vfs_is_streaming(fd)) || (info.playback && info.playback->playing)) { gchar *tmp = NULL; - tuple = tuple_new_from_filename(filename); + tuple = aud_tuple_new_from_filename(filename); #ifdef DEBUG if(info.playback) @@ -667,7 +667,7 @@ gchar *scratch; scratch = str_to_utf8(tmp); - tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); g_free(tmp); g_free(scratch); @@ -678,7 +678,7 @@ gchar *scratch; scratch = str_to_utf8(tmp); - tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, scratch); g_free(tmp); g_free(scratch); @@ -686,11 +686,11 @@ } #ifdef DEBUG - g_message("audmad_get_song_tuple: track_name = %s", tuple_get_string(tuple, -1, "track-name")); - g_message("audmad_get_song_tuple: stream_name = %s", tuple_get_string(tuple, -1, "stream-name")); + g_message("audmad_get_song_tuple: track_name = %s", aud_tuple_get_string(tuple, -1, "track-name")); + g_message("audmad_get_song_tuple: stream_name = %s", aud_tuple_get_string(tuple, -1, "stream-name")); #endif - tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); - tuple_associate_int(tuple, FIELD_MTIME, NULL, 0); // this indicates streaming + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(tuple, FIELD_MTIME, NULL, 0); // this indicates streaming #ifdef DEBUG g_message("get_song_tuple: remote: tuple"); #endif @@ -710,8 +710,8 @@ local_fd = TRUE; } - tuple = tuple_new(); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); + tuple = aud_tuple_new(); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); id3file = id3_file_vfsopen(fd, ID3_FILE_MODE_READONLY); @@ -730,22 +730,22 @@ string = input_id3_get_string(tag, "TYER"); if (string) { - tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi(string)); g_free(string); string = NULL; } realfn = g_filename_from_uri(filename, NULL, NULL); __set_and_free(tuple, FIELD_FILE_NAME, NULL, g_path_get_basename(realfn ? realfn : filename)); __set_and_free(tuple, FIELD_FILE_PATH, NULL, g_path_get_dirname(realfn ? realfn : filename)); - tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); g_free(realfn); realfn = NULL; // length string = input_id3_get_string(tag, "TLEN"); if (string) { - tuple_associate_int(tuple, FIELD_LENGTH, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, atoi(string)); #ifdef DEBUG - g_message("get_song_tuple: TLEN = %d", tuple_get_int(tuple, FIELD_LENGTH, NULL)); + g_message("get_song_tuple: TLEN = %d", aud_tuple_get_int(tuple, FIELD_LENGTH, NULL)); #endif g_free(string); string = NULL; @@ -754,14 +754,14 @@ char *dummy = NULL; int length = 0; audmad_get_song_length(filename, &length, fd); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, length); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, length); g_free(dummy); } // track number string = input_id3_get_string(tag, ID3_FRAME_TRACK); if (string) { - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(string)); + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(string)); g_free(string); string = NULL; } @@ -769,7 +769,7 @@ __set_and_free(tuple, FIELD_GENRE, NULL, input_id3_get_string(tag, ID3_FRAME_GENRE)); __set_and_free(tuple, FIELD_COMMENT, NULL, input_id3_get_string(tag, ID3_FRAME_COMMENT)); #ifdef DEBUG - g_message("genre = %s", tuple_get_string(tuple, FIELD_GENRE, NULL)); + g_message("genre = %s", aud_tuple_get_string(tuple, FIELD_GENRE, NULL)); #endif } id3_file_close(id3file); @@ -778,22 +778,22 @@ realfn = g_filename_from_uri(filename, NULL, NULL); __set_and_free(tuple, FIELD_FILE_NAME, NULL, g_path_get_basename(realfn ? realfn : filename)); __set_and_free(tuple, FIELD_FILE_PATH, NULL, g_path_get_dirname(realfn ? realfn : filename)); - tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, extname(realfn ? realfn : filename)); g_free(realfn); realfn = NULL; // length { char *dummy = NULL; int length = 0; - if(tuple_get_int(tuple, FIELD_LENGTH, NULL) == -1) { + if(aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) == -1) { audmad_get_song_length(filename, &length, fd); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, length); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, length); } g_free(dummy); } } - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); - tuple_associate_string(tuple, FIELD_CODEC, NULL, "MPEG Audio (MP3)"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "MPEG Audio (MP3)"); if(local_fd) vfs_fclose(fd); diff -r f86cb7fc1d4f -r 5fa26178eaef src/modplug/modplugbmp.cxx --- a/src/modplug/modplugbmp.cxx Wed Oct 03 17:24:59 2007 +0200 +++ b/src/modplug/modplugbmp.cxx Sun Oct 07 00:22:59 2007 -0500 @@ -21,10 +21,10 @@ static char* format_and_free_ti( Tuple* ti, int* length ) { - char* result = tuple_formatter_make_title_string(ti, get_gentitle_format()); + char* result = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); if ( result ) - *length = tuple_get_int(ti, FIELD_LENGTH, NULL); - tuple_free((void *) ti); + *length = aud_tuple_get_int(ti, FIELD_LENGTH, NULL); + aud_tuple_free((void *) ti); return result; } @@ -513,7 +513,7 @@ return NULL; } - Tuple *ti = tuple_new_from_filename(aFilename.c_str()); + Tuple *ti = aud_tuple_new_from_filename(aFilename.c_str()); lSoundFile = new CSoundFile; lSoundFile->Create((uchar*)lArchive->Map(), lArchive->Size()); @@ -542,16 +542,16 @@ case MOD_TYPE_PSM: tmps = "Protracker Studio Module"; break; default: tmps = "ModPlug unknown"; break; } - tuple_associate_string(ti, FIELD_CODEC, NULL, tmps.c_str()); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); - tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, tmps.c_str()); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); /* NOTICE! FIXME? This is actually incorrect. We _cannot_ know what charset * an arbitrary module file uses .. typically it is some DOS CP-variant, * except for true Amiga modules. */ gchar *tmps2 = str_to_utf8(lSoundFile->GetTitle()); - tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2); g_free(tmps2); //unload the file diff -r f86cb7fc1d4f -r 5fa26178eaef src/mtp_up/mtp.c --- a/src/mtp_up/mtp.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/mtp_up/mtp.c Sun Oct 07 00:22:59 2007 -0500 @@ -135,7 +135,7 @@ uint32_t parent_id = 0; struct stat sb; - from_path = g_strdup_printf("%s/%s", tuple_get_string(from_tuple, FIELD_FILE_PATH, NULL), tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); + from_path = g_strdup_printf("%s/%s", aud_tuple_get_string(from_tuple, FIELD_FILE_PATH, NULL), aud_tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); gchar *tmp; tmp = g_strescape(from_path,NULL); filename=g_filename_from_uri(tmp,NULL,NULL); @@ -162,15 +162,15 @@ /* track metadata*/ tr = LIBMTP_new_track_t(); - tr->title = g_strdup((gchar*) tuple_get_string(from_tuple, FIELD_TITLE, NULL)); - tr->artist = g_strdup((gchar*) tuple_get_string(from_tuple, FIELD_ARTIST, NULL)); - tr->album = g_strdup((gchar*)tuple_get_string(from_tuple, FIELD_ALBUM, NULL)); + tr->title = g_strdup((gchar*) aud_tuple_get_string(from_tuple, FIELD_TITLE, NULL)); + tr->artist = g_strdup((gchar*) aud_tuple_get_string(from_tuple, FIELD_ARTIST, NULL)); + tr->album = g_strdup((gchar*)aud_tuple_get_string(from_tuple, FIELD_ALBUM, NULL)); tr->filesize = filesize; - tr->filename = g_strdup(tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); - tr->duration = (uint32_t)tuple_get_int(from_tuple, FIELD_LENGTH, NULL); + tr->filename = g_strdup(aud_tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); + tr->duration = (uint32_t)aud_tuple_get_int(from_tuple, FIELD_LENGTH, NULL); tr->filetype = find_filetype (from_path); - tr->genre = g_strdup((gchar*)tuple_get_string(from_tuple, FIELD_GENRE, NULL)); - tr->date = g_strdup_printf("%d",tuple_get_int(from_tuple, FIELD_YEAR, NULL)); + tr->genre = g_strdup((gchar*)aud_tuple_get_string(from_tuple, FIELD_GENRE, NULL)); + tr->date = g_strdup_printf("%d",aud_tuple_get_int(from_tuple, FIELD_YEAR, NULL)); g_free(filename); g_free(from_path); g_free(tmp); @@ -184,7 +184,7 @@ uint32_t parent_id = 0; LIBMTP_track_t *gentrack; gentrack = track_metadata(from_tuple); - from_path = g_strdup_printf("%s/%s", tuple_get_string(from_tuple, FIELD_FILE_PATH, NULL), tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); + from_path = g_strdup_printf("%s/%s", aud_tuple_get_string(from_tuple, FIELD_FILE_PATH, NULL), aud_tuple_get_string(from_tuple, FIELD_FILE_NAME, NULL)); if(gentrack == NULL) return 1; comp = g_strescape(from_path,NULL); g_free(from_path); diff -r f86cb7fc1d4f -r 5fa26178eaef src/musepack/libmpc.cxx --- a/src/musepack/libmpc.cxx Wed Oct 03 17:24:59 2007 +0200 +++ b/src/musepack/libmpc.cxx Sun Oct 07 00:22:59 2007 -0500 @@ -355,18 +355,18 @@ if(input) { - tuple = tuple_new_from_filename(p_Filename); + tuple = aud_tuple_new_from_filename(p_Filename); MpcInfo tags = getTags(p_Filename); - tuple_associate_string(tuple, FIELD_DATE, NULL, tags.date); - tuple_associate_string(tuple, FIELD_TITLE, NULL, tags.title); - tuple_associate_string(tuple, FIELD_ARTIST, NULL, tags.artist); - tuple_associate_string(tuple, FIELD_ALBUM, NULL, tags.album); - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, tags.track); - tuple_associate_int(tuple, FIELD_YEAR, NULL, tags.year); - tuple_associate_string(tuple, FIELD_GENRE, NULL, tags.genre); - tuple_associate_string(tuple, FIELD_COMMENT, NULL, tags.comment); + aud_tuple_associate_string(tuple, FIELD_DATE, NULL, tags.date); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, tags.title); + aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, tags.artist); + aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, tags.album); + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, tags.track); + aud_tuple_associate_int(tuple, FIELD_YEAR, NULL, tags.year); + aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, tags.genre); + aud_tuple_associate_string(tuple, FIELD_COMMENT, NULL, tags.comment); freeTags(tags); @@ -375,14 +375,14 @@ mpc_reader_setup_file_vfs(&reader, input); mpc_streaminfo_read(&info, &reader.reader); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, static_cast (1000 * mpc_streaminfo_get_length(&info))); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, static_cast (1000 * mpc_streaminfo_get_length(&info))); gchar *scratch = g_strdup_printf("Musepack v%d (encoder %s)", info.stream_version, info.encoder); - tuple_associate_string(tuple, FIELD_CODEC, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, scratch); g_free(scratch); scratch = g_strdup_printf("lossy (%s)", info.profile_name); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, scratch); g_free(scratch); vfs_fclose(input); @@ -743,9 +743,9 @@ { Tuple* tuple = mpcGetSongTuple(p_Filename); - char* title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + char* title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); - tuple_free((void *) tuple); + aud_tuple_free((void *) tuple); return title; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/scrobbler/gerpok.c --- a/src/scrobbler/gerpok.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/scrobbler/gerpok.c Sun Oct 07 00:22:59 2007 -0500 @@ -92,8 +92,8 @@ item = malloc(sizeof(item_t)); - item->artist = fmt_escape(tuple_get_string(tuple, FIELD_ARTIST, NULL)); - item->title = fmt_escape(tuple_get_string(tuple, FIELD_TITLE, NULL)); + item->artist = fmt_escape(aud_tuple_get_string(tuple, FIELD_ARTIST, NULL)); + item->title = fmt_escape(aud_tuple_get_string(tuple, FIELD_TITLE, NULL)); item->utctime = fmt_escape(fmt_timestr(time(NULL), 1)); g_snprintf(item->len, sizeof(item->len), "%d", len); @@ -106,7 +106,7 @@ item->mb = fmt_escape((char*)tuple->mb); #endif - if((album = tuple_get_string(tuple, FIELD_ALBUM, NULL))) + if((album = aud_tuple_get_string(tuple, FIELD_ALBUM, NULL))) item->album = fmt_escape(""); else item->album = fmt_escape((char*) album); diff -r f86cb7fc1d4f -r 5fa26178eaef src/scrobbler/plugin.c --- a/src/scrobbler/plugin.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/scrobbler/plugin.c Sun Oct 07 00:22:59 2007 -0500 @@ -240,19 +240,19 @@ if (tuple == NULL) continue; - if (ishttp(tuple_get_string(tuple, FIELD_FILE_NAME, NULL))) + if (ishttp(aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL))) continue; - if (tuple_get_string(tuple, FIELD_ARTIST, NULL) != NULL && - tuple_get_string(tuple, FIELD_TITLE, NULL) != NULL) + if (aud_tuple_get_string(tuple, FIELD_ARTIST, NULL) != NULL && + aud_tuple_get_string(tuple, FIELD_TITLE, NULL) != NULL) { pdebug(fmt_vastr( "submitting artist: %s, title: %s", - tuple_get_string(tuple, FIELD_ARTIST, NULL), - tuple_get_string(tuple, FIELD_TITLE, NULL)), DEBUG); + aud_tuple_get_string(tuple, FIELD_ARTIST, NULL), + aud_tuple_get_string(tuple, FIELD_TITLE, NULL)), DEBUG); - sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); - gerpok_sc_addentry(m_scrobbler, tuple, tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); + sc_addentry(m_scrobbler, tuple, aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); + gerpok_sc_addentry(m_scrobbler, tuple, aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000); } else pdebug("tuple does not contain an artist or a title, not submitting.", DEBUG); diff -r f86cb7fc1d4f -r 5fa26178eaef src/scrobbler/scrobbler.c --- a/src/scrobbler/scrobbler.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/scrobbler/scrobbler.c Sun Oct 07 00:22:59 2007 -0500 @@ -131,12 +131,12 @@ item = malloc(sizeof(item_t)); - item->artist = fmt_escape(tuple_get_string(tuple, FIELD_ARTIST, NULL)); - item->title = fmt_escape(tuple_get_string(tuple, FIELD_TITLE, NULL)); + item->artist = fmt_escape(aud_tuple_get_string(tuple, FIELD_ARTIST, NULL)); + item->title = fmt_escape(aud_tuple_get_string(tuple, FIELD_TITLE, NULL)); g_snprintf(item->utctime, sizeof(item->utctime), "%ld", time(NULL)); g_snprintf(item->len, sizeof(item->len), "%d", len); g_snprintf(item->track, sizeof(item->track), "%d", - tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); + aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); #ifdef NOTYET if(tuple->mb == NULL) @@ -147,7 +147,7 @@ item->mb = fmt_escape((char*)tuple->mb); #endif - if((album = tuple_get_string(tuple, FIELD_ALBUM, NULL)) != NULL) + if((album = aud_tuple_get_string(tuple, FIELD_ALBUM, NULL)) != NULL) item->album = fmt_escape(""); else item->album = fmt_escape((char*) album); @@ -674,11 +674,11 @@ /*cfa(&post, &last, "debug", "failed");*/ entry = g_strdup_printf("s=%s&a=%s&t=%s&b=%s&l=%d&n=%d&m=", sc_session_id, - tuple_get_string(tuple, FIELD_ARTIST, NULL), - tuple_get_string(tuple, FIELD_TITLE, NULL), - tuple_get_string(tuple, FIELD_ALBUM, NULL) ? tuple_get_string(tuple, FIELD_ALBUM, NULL) : "", - tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000, - tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); + aud_tuple_get_string(tuple, FIELD_ARTIST, NULL), + aud_tuple_get_string(tuple, FIELD_TITLE, NULL), + aud_tuple_get_string(tuple, FIELD_ALBUM, NULL) ? aud_tuple_get_string(tuple, FIELD_ALBUM, NULL) : "", + aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) / 1000, + aud_tuple_get_int(tuple, FIELD_TRACK_NUMBER, NULL)); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, (char *) entry); memset(sc_curl_errbuf, 0, sizeof(sc_curl_errbuf)); @@ -883,15 +883,15 @@ ptr1 = ptr2 + 1; { - Tuple *tuple = tuple_new(); + Tuple *tuple = aud_tuple_new(); - tuple_associate_string(tuple, FIELD_ARTIST, NULL, xmms_urldecode_plain(artist)); - tuple_associate_string(tuple, FIELD_TITLE, NULL, xmms_urldecode_plain(title)); - tuple_associate_string(tuple, FIELD_ALBUM, NULL, xmms_urldecode_plain(album)); + aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, xmms_urldecode_plain(artist)); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, xmms_urldecode_plain(title)); + aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, xmms_urldecode_plain(album)); item = q_put(tuple, atoi(len)); - tuple_free(tuple); + aud_tuple_free(tuple); } pdebug(fmt_vastr("a[%d]=%s t[%d]=%s l[%d]=%s i[%d]=%s m[%d]=%s b[%d]=%s", diff -r f86cb7fc1d4f -r 5fa26178eaef src/sexypsf/plugin.c --- a/src/sexypsf/plugin.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/sexypsf/plugin.c Sun Oct 07 00:22:59 2007 -0500 @@ -217,24 +217,24 @@ } } -static Tuple *get_tuple_psf(gchar *fn) { +static Tuple *get_aud_tuple_psf(gchar *fn) { Tuple *tuple = NULL; PSFINFO *tmp = sexypsf_getpsfinfo(fn); if (tmp->length) { - tuple = tuple_new_from_filename(fn); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, tmp->length); - tuple_associate_string(tuple, FIELD_ARTIST, NULL, tmp->artist); - tuple_associate_string(tuple, FIELD_ALBUM, NULL, tmp->game); - tuple_associate_string(tuple, -1, "game", tmp->game); - tuple_associate_string(tuple, FIELD_TITLE, NULL, tmp->title); - tuple_associate_string(tuple, FIELD_GENRE, NULL, tmp->genre); - tuple_associate_string(tuple, FIELD_COPYRIGHT, NULL, tmp->copyright); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "sequenced"); - tuple_associate_string(tuple, FIELD_CODEC, NULL, "PlayStation Audio"); - tuple_associate_string(tuple, -1, "console", "PlayStation"); - tuple_associate_string(tuple, -1, "dumper", tmp->psfby); - tuple_associate_string(tuple, FIELD_COMMENT, NULL, tmp->comment); + tuple = aud_tuple_new_from_filename(fn); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, tmp->length); + aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, tmp->artist); + aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, tmp->game); + aud_tuple_associate_string(tuple, -1, "game", tmp->game); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, tmp->title); + aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, tmp->genre); + aud_tuple_associate_string(tuple, FIELD_COPYRIGHT, NULL, tmp->copyright); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "sequenced"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "PlayStation Audio"); + aud_tuple_associate_string(tuple, -1, "console", "PlayStation"); + aud_tuple_associate_string(tuple, -1, "dumper", tmp->psfby); + aud_tuple_associate_string(tuple, FIELD_COMMENT, NULL, tmp->comment); sexypsf_freepsfinfo(tmp); } @@ -244,11 +244,11 @@ static gchar *get_title_psf(gchar *fn) { gchar *title = NULL; - Tuple *tuple = get_tuple_psf(fn); + Tuple *tuple = get_aud_tuple_psf(fn); if (tuple != NULL) { - title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); - tuple_free(tuple); + title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); + aud_tuple_free(tuple); } else title = g_path_get_basename(fn); @@ -267,7 +267,7 @@ .seek = sexypsf_xmms_seek, .get_time = sexypsf_xmms_gettime, .get_song_info = sexypsf_xmms_getsonginfo, - .get_song_tuple = get_tuple_psf, + .get_song_tuple = get_aud_tuple_psf, .is_our_file_from_vfs = is_our_fd, .vfs_extensions = sexypsf_fmts, }; diff -r f86cb7fc1d4f -r 5fa26178eaef src/sid/xmms-sid.c --- a/src/sid/xmms-sid.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/sid/xmms-sid.c Sun Oct 07 00:22:59 2007 -0500 @@ -87,7 +87,7 @@ XS_MUTEX(xs_status); static XS_THREAD_T xs_decode_thread; -void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune); +void xs_get_song_aud_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune); /* * Error messages @@ -395,10 +395,10 @@ XSDEBUG("foobar #1\n"); xs_status.sidPlayer->plrUpdateSIDInfo(&xs_status); XS_MUTEX_UNLOCK(xs_status); - tmpTuple = tuple_new_from_filename(tmpTune->sidFilename); - xs_get_song_tuple_info(tmpTuple, tmpTune, xs_status.currSong); + tmpTuple = aud_tuple_new_from_filename(tmpTune->sidFilename); + xs_get_song_aud_tuple_info(tmpTuple, tmpTune, xs_status.currSong); - tmpTitle = tuple_formatter_process_string(tmpTuple, + tmpTitle = aud_tuple_formatter_process_string(tmpTuple, xs_cfg.titleOverride ? xs_cfg.titleFormat : get_gentitle_format()); XSDEBUG("foobar #4\n"); @@ -592,20 +592,20 @@ /* * Return song information Tuple */ -void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune) +void xs_get_song_aud_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune) { gchar *tmpStr, tmpStr2[64]; - tuple_associate_string(pResult, FIELD_TITLE, NULL, pInfo->sidName); - tuple_associate_string(pResult, FIELD_ARTIST, NULL, pInfo->sidComposer); - tuple_associate_string(pResult, FIELD_GENRE, NULL, "SID-tune"); - tuple_associate_string(pResult, FIELD_COPYRIGHT, NULL, pInfo->sidCopyright); + aud_tuple_associate_string(pResult, FIELD_TITLE, NULL, pInfo->sidName); + aud_tuple_associate_string(pResult, FIELD_ARTIST, NULL, pInfo->sidComposer); + aud_tuple_associate_string(pResult, FIELD_GENRE, NULL, "SID-tune"); + aud_tuple_associate_string(pResult, FIELD_COPYRIGHT, NULL, pInfo->sidCopyright); if (xs_cfg.subAutoEnable) - tuple_associate_int(pResult, FIELD_SUBSONG_NUM, NULL, pInfo->nsubTunes); + aud_tuple_associate_int(pResult, FIELD_SUBSONG_NUM, NULL, pInfo->nsubTunes); - tuple_associate_int(pResult, -1, "subtunes", pInfo->nsubTunes); - tuple_associate_string(pResult, -1, "sid-format", pInfo->sidFormat); + aud_tuple_associate_int(pResult, -1, "subtunes", pInfo->nsubTunes); + aud_tuple_associate_string(pResult, -1, "sid-format", pInfo->sidFormat); switch (pInfo->sidModel) { case XS_SIDMODEL_6581: tmpStr = "6581"; break; @@ -613,7 +613,7 @@ case XS_SIDMODEL_ANY: tmpStr = "ANY"; break; default: tmpStr = "?"; break; } - tuple_associate_string(pResult, -1, "sid-model", tmpStr); + aud_tuple_associate_string(pResult, -1, "sid-model", tmpStr); /* Get sub-tune information, if available */ if (subTune < 0 || pInfo->startTune > pInfo->nsubTunes) @@ -621,7 +621,7 @@ if ((subTune > 0) && (subTune <= pInfo->nsubTunes)) { gint tmpInt = pInfo->subTunes[subTune - 1].tuneLength; - tuple_associate_int(pResult, FIELD_LENGTH, NULL, (tmpInt < 0) ? -1 : tmpInt * 1000); + aud_tuple_associate_int(pResult, FIELD_LENGTH, NULL, (tmpInt < 0) ? -1 : tmpInt * 1000); tmpInt = pInfo->subTunes[subTune - 1].tuneSpeed; if (tmpInt > 0) { @@ -639,16 +639,16 @@ } else tmpStr = "?"; - tuple_associate_string(pResult, -1, "sid-speed", tmpStr); + aud_tuple_associate_string(pResult, -1, "sid-speed", tmpStr); } else subTune = 1; - tuple_associate_int(pResult, -1, "subtune", subTune); - tuple_associate_int(pResult, FIELD_SUBSONG_ID, NULL, subTune); - tuple_associate_int(pResult, FIELD_TRACK_NUMBER, NULL, subTune); + aud_tuple_associate_int(pResult, -1, "subtune", subTune); + aud_tuple_associate_int(pResult, FIELD_SUBSONG_ID, NULL, subTune); + aud_tuple_associate_int(pResult, FIELD_TRACK_NUMBER, NULL, subTune); if (xs_cfg.titleOverride) - tuple_associate_string(pResult, FIELD_FORMATTER, NULL, xs_cfg.titleFormat); + aud_tuple_associate_string(pResult, FIELD_FORMATTER, NULL, xs_cfg.titleFormat); } @@ -662,7 +662,7 @@ /* Get information from URL */ xs_get_trackinfo(songFilename, &tmpFilename, &tmpTune); - tmpResult = tuple_new_from_filename(tmpFilename); + tmpResult = aud_tuple_new_from_filename(tmpFilename); if (!tmpResult) { g_free(tmpFilename); return NULL; @@ -677,7 +677,7 @@ if (!tmpInfo) return tmpResult; - xs_get_song_tuple_info(tmpResult, tmpInfo, tmpTune); + xs_get_song_aud_tuple_info(tmpResult, tmpInfo, tmpTune); xs_tuneinfo_free(tmpInfo); return tmpResult; @@ -707,7 +707,7 @@ /* Get information from URL */ xs_get_trackinfo(songFilename, &tmpFilename, &tmpTune); - tmpResult = tuple_new_from_filename(tmpFilename); + tmpResult = aud_tuple_new_from_filename(tmpFilename); if (!tmpResult) { g_free(tmpFilename); return NULL; @@ -722,7 +722,7 @@ if (!tmpInfo) return tmpResult; - xs_get_song_tuple_info(tmpResult, tmpInfo, tmpTune); + xs_get_song_aud_tuple_info(tmpResult, tmpInfo, tmpTune); xs_tuneinfo_free(tmpInfo); return tmpResult; diff -r f86cb7fc1d4f -r 5fa26178eaef src/statusicon/si_ui.c --- a/src/statusicon/si_ui.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/statusicon/si_ui.c Sun Oct 07 00:22:59 2007 -0500 @@ -150,7 +150,7 @@ GtkWidget *popup = g_object_get_data( G_OBJECT(evbox) , "popup" ); tuple = playlist_get_tuple( pl_active , pos ); - if ( ( tuple == NULL ) || ( tuple_get_int(tuple, FIELD_LENGTH, NULL) < 1 ) ) + if ( ( tuple == NULL ) || ( aud_tuple_get_int(tuple, FIELD_LENGTH, NULL) < 1 ) ) { gchar *title = playlist_get_songtitle( pl_active , pos ); audacious_fileinfopopup_show_from_title( popup , title ); diff -r f86cb7fc1d4f -r 5fa26178eaef src/timidity/xmms-timidity.c --- a/src/timidity/xmms-timidity.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/timidity/xmms-timidity.c Sun Oct 07 00:22:59 2007 -0500 @@ -289,13 +289,13 @@ Tuple *input; gchar *title; - input = tuple_new_from_filename(filename); + input = aud_tuple_new_from_filename(filename); - title = tuple_formatter_make_title_string(input, get_gentitle_format()); + title = aud_tuple_formatter_make_title_string(input, get_gentitle_format()); if (title == NULL || *title == '\0') - title = g_strdup(tuple_get_string(input, FIELD_FILE_NAME, NULL)); + title = g_strdup(aud_tuple_get_string(input, FIELD_FILE_NAME, NULL)); - tuple_free(input); + aud_tuple_free(input); return title; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/tta/libtta.c --- a/src/tta/libtta.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/tta/libtta.c Sun Oct 07 00:22:59 2007 -0500 @@ -157,7 +157,7 @@ static gchar * get_song_title(Tuple *tuple) { - return tuple_formatter_make_title_string(tuple, get_gentitle_format()); + return aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); } static void @@ -169,11 +169,11 @@ *title = NULL; if ((tuple = get_song_tuple(filename)) != NULL) { - *length = tuple_get_int(tuple, FIELD_LENGTH, NULL); + *length = aud_tuple_get_int(tuple, FIELD_LENGTH, NULL); *title = get_song_title(tuple); } - tuple_free(tuple); + aud_tuple_free(tuple); } static void * @@ -483,7 +483,7 @@ tuple = get_song_tuple(filename); title = get_song_title(tuple); - tuple_free(tuple); + aud_tuple_free(tuple); datasize = file_size(filename) - info.DATAPOS; origsize = info.DATALENGTH * info.BSIZE * info.NCH; @@ -555,32 +555,32 @@ if((file = vfs_fopen(filename, "rb")) != NULL) { if(open_tta_file(filename, ttainfo, 0) >= 0) { - tuple = tuple_new_from_filename(filename); + tuple = aud_tuple_new_from_filename(filename); - tuple_associate_string(tuple, FIELD_CODEC, NULL, "True Audio (TTA)"); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossless"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "True Audio (TTA)"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossless"); if (ttainfo->ID3.id3has) { if (ttainfo->ID3.artist) - tuple_associate_string(tuple, FIELD_ARTIST, NULL, (gchar *) ttainfo->ID3.artist); + aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, (gchar *) ttainfo->ID3.artist); if (ttainfo->ID3.album) - tuple_associate_string(tuple, FIELD_ALBUM, NULL, (gchar *) ttainfo->ID3.album); + aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, (gchar *) ttainfo->ID3.album); if (ttainfo->ID3.title) - tuple_associate_string(tuple, FIELD_TITLE, NULL, (gchar *) ttainfo->ID3.title); + aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, (gchar *) ttainfo->ID3.title); if (ttainfo->ID3.year) - tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi((char *)ttainfo->ID3.year)); + aud_tuple_associate_int(tuple, FIELD_YEAR, NULL, atoi((char *)ttainfo->ID3.year)); if(ttainfo->ID3.track) - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi((char *)ttainfo->ID3.track)); + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi((char *)ttainfo->ID3.track)); if(ttainfo->ID3.genre) - tuple_associate_string(tuple, FIELD_GENRE, NULL, (gchar *) ttainfo->ID3.genre); + aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, (gchar *) ttainfo->ID3.genre); if(ttainfo->ID3.comment) - tuple_associate_string(tuple, FIELD_COMMENT, NULL, (gchar *) ttainfo->ID3.comment); + aud_tuple_associate_string(tuple, FIELD_COMMENT, NULL, (gchar *) ttainfo->ID3.comment); } close_tta_file (ttainfo); } diff -r f86cb7fc1d4f -r 5fa26178eaef src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/vorbis/vorbis.c Sun Oct 07 00:22:59 2007 -0500 @@ -591,11 +591,11 @@ { Tuple *tuple = get_song_tuple(filename); - *length = tuple_get_int(tuple, FIELD_LENGTH, NULL); - *title = tuple_formatter_make_title_string(tuple, vorbis_cfg.tag_override ? + *length = aud_tuple_get_int(tuple, FIELD_LENGTH, NULL); + *title = aud_tuple_formatter_make_title_string(tuple, vorbis_cfg.tag_override ? vorbis_cfg.tag_format : get_gentitle_format()); - tuple_free(tuple); + aud_tuple_free(tuple); } /* @@ -716,11 +716,11 @@ return 2 * ch * samples; } -static void _tuple_associate_string(Tuple *tuple, const gint nfield, const gchar *field, const gchar *string) +static void _aud_tuple_associate_string(Tuple *tuple, const gint nfield, const gchar *field, const gchar *string) { if (string) { gchar *str = str_to_utf8(string); - tuple_associate_string(tuple, nfield, field, str); + aud_tuple_associate_string(tuple, nfield, field, str); g_free(str); } } @@ -729,38 +729,38 @@ * Ok, nhjm449! Are you *happy* now?! -nenolod */ static Tuple * -get_tuple_for_vorbisfile(OggVorbis_File * vorbisfile, gchar *filename, gboolean is_stream) +get_aud_tuple_for_vorbisfile(OggVorbis_File * vorbisfile, gchar *filename, gboolean is_stream) { Tuple *tuple = NULL; vorbis_comment *comment; - tuple = tuple_new_from_filename(filename); + tuple = aud_tuple_new_from_filename(filename); /* Retrieve the length */ - tuple_associate_int(tuple, FIELD_LENGTH, NULL, + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, is_stream ? -1 : (ov_time_total(vorbisfile, -1) * 1000)); if ((comment = ov_comment(vorbisfile, -1))) { gchar *tmps; - _tuple_associate_string(tuple, FIELD_TITLE, NULL, vorbis_comment_query(comment, "title", 0)); - _tuple_associate_string(tuple, FIELD_ARTIST, NULL, vorbis_comment_query(comment, "artist", 0)); - _tuple_associate_string(tuple, FIELD_ALBUM, NULL, vorbis_comment_query(comment, "album", 0)); - _tuple_associate_string(tuple, -1, "date", vorbis_comment_query(comment, "date", 0)); - _tuple_associate_string(tuple, FIELD_GENRE, NULL, vorbis_comment_query(comment, "genre", 0)); - _tuple_associate_string(tuple, FIELD_COMMENT, NULL, vorbis_comment_query(comment, "comment", 0)); + _aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, vorbis_comment_query(comment, "title", 0)); + _aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, vorbis_comment_query(comment, "artist", 0)); + _aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, vorbis_comment_query(comment, "album", 0)); + _aud_tuple_associate_string(tuple, -1, "date", vorbis_comment_query(comment, "date", 0)); + _aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, vorbis_comment_query(comment, "genre", 0)); + _aud_tuple_associate_string(tuple, FIELD_COMMENT, NULL, vorbis_comment_query(comment, "comment", 0)); if ((tmps = vorbis_comment_query(comment, "tracknumber", 0)) != NULL) - tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(tmps)); + aud_tuple_associate_int(tuple, FIELD_TRACK_NUMBER, NULL, atoi(tmps)); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossy"); if (comment && comment->vendor) { gchar *codec = g_strdup_printf("Ogg Vorbis [%s]", comment->vendor); - tuple_associate_string(tuple, FIELD_CODEC, NULL, codec); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, codec); g_free(codec); } else - tuple_associate_string(tuple, FIELD_CODEC, NULL, "Ogg Vorbis"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "Ogg Vorbis"); } return tuple; @@ -792,7 +792,7 @@ return NULL; } - tuple = get_tuple_for_vorbisfile(&vfile, filename, is_stream); + tuple = get_aud_tuple_for_vorbisfile(&vfile, filename, is_stream); /* * once the ov_open succeeds, the stream belongs to @@ -811,25 +811,25 @@ Tuple *input; gchar *tmp; - input = get_tuple_for_vorbisfile(vorbisfile, filename, vorbis_is_streaming); + input = get_aud_tuple_for_vorbisfile(vorbisfile, filename, vorbis_is_streaming); - displaytitle = tuple_formatter_make_title_string(input, vorbis_cfg.tag_override ? + displaytitle = aud_tuple_formatter_make_title_string(input, vorbis_cfg.tag_override ? vorbis_cfg.tag_format : get_gentitle_format()); if ((tmp = vfs_get_metadata(((VFSVorbisFile *) vorbisfile->datasource)->fd, "stream-name")) != NULL) { gchar *old = displaytitle; - tuple_associate_string(input, -1, "stream", tmp); - tuple_associate_string(input, FIELD_TITLE, NULL, old); + aud_tuple_associate_string(input, -1, "stream", tmp); + aud_tuple_associate_string(input, FIELD_TITLE, NULL, old); - displaytitle = tuple_formatter_process_string(input, "${?title:${title}}${?stream: (${stream})}"); + displaytitle = aud_tuple_formatter_process_string(input, "${?title:${title}}${?stream: (${stream})}"); g_free(old); g_free(tmp); } - tuple_free(input); + aud_tuple_free(input); return displaytitle; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/vtx/vtx.c --- a/src/vtx/vtx.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/vtx/vtx.c Sun Oct 07 00:22:59 2007 -0500 @@ -93,25 +93,25 @@ } Tuple * -vtx_get_song_tuple_from_vtx(const gchar *filename, ayemu_vtx_t *in) +vtx_get_song_aud_tuple_from_vtx(const gchar *filename, ayemu_vtx_t *in) { - Tuple *out = tuple_new_from_filename(filename); + Tuple *out = aud_tuple_new_from_filename(filename); gchar *string; - tuple_associate_string(out, FIELD_ARTIST, NULL, in->hdr.author); - tuple_associate_string(out, FIELD_TITLE, NULL, in->hdr.title); + aud_tuple_associate_string(out, FIELD_ARTIST, NULL, in->hdr.author); + aud_tuple_associate_string(out, FIELD_TITLE, NULL, in->hdr.title); - tuple_associate_int(out, FIELD_LENGTH, NULL, in->hdr.regdata_size / 14 * 1000 / 50); + aud_tuple_associate_int(out, FIELD_LENGTH, NULL, in->hdr.regdata_size / 14 * 1000 / 50); - tuple_associate_string(out, FIELD_GENRE, NULL, (in->hdr.chiptype == AYEMU_AY)? "AY chiptunes" : "YM chiptunes"); - tuple_associate_string(out, FIELD_ALBUM, NULL, in->hdr.from); - tuple_associate_string(out, -1, "game", in->hdr.from); + aud_tuple_associate_string(out, FIELD_GENRE, NULL, (in->hdr.chiptype == AYEMU_AY)? "AY chiptunes" : "YM chiptunes"); + aud_tuple_associate_string(out, FIELD_ALBUM, NULL, in->hdr.from); + aud_tuple_associate_string(out, -1, "game", in->hdr.from); - tuple_associate_string(out, FIELD_QUALITY, NULL, "sequenced"); - tuple_associate_string(out, FIELD_CODEC, NULL, in->hdr.tracker); - tuple_associate_string(out, -1, "tracker", in->hdr.tracker); + aud_tuple_associate_string(out, FIELD_QUALITY, NULL, "sequenced"); + aud_tuple_associate_string(out, FIELD_CODEC, NULL, in->hdr.tracker); + aud_tuple_associate_string(out, -1, "tracker", in->hdr.tracker); - tuple_associate_int(out, FIELD_YEAR, NULL, in->hdr.year); + aud_tuple_associate_int(out, FIELD_YEAR, NULL, in->hdr.year); return out; } @@ -123,7 +123,7 @@ if (ayemu_vtx_open (&tmp, filename)) { - Tuple *ti = vtx_get_song_tuple_from_vtx(filename, &tmp); + Tuple *ti = vtx_get_song_aud_tuple_from_vtx(filename, &tmp); ayemu_vtx_free(&tmp); return ti; } @@ -233,15 +233,15 @@ playback->eof = FALSE; seek_to = -1; - ti = vtx_get_song_tuple_from_vtx(playback->filename, &vtx); - buf = tuple_formatter_make_title_string(ti, get_gentitle_format()); + ti = vtx_get_song_aud_tuple_from_vtx(playback->filename, &vtx); + buf = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); vtx_ip.set_info (buf, vtx.hdr.regdata_size / 14 * 1000 / 50, 14 * 50 * 8, freq, bits / 8); g_free (buf); - tuple_free(ti); + aud_tuple_free(ti); playback->playing = TRUE; play_thread = g_thread_self(); @@ -296,13 +296,13 @@ (*title) = NULL; if (ayemu_vtx_open (&tmp, filename)) { - Tuple *ti = vtx_get_song_tuple_from_vtx(filename, &tmp); + Tuple *ti = vtx_get_song_aud_tuple_from_vtx(filename, &tmp); - *title = tuple_formatter_process_string(ti, get_gentitle_format()); - *length = tuple_get_int(ti, FIELD_LENGTH, NULL); + *title = aud_tuple_formatter_process_string(ti, get_gentitle_format()); + *length = aud_tuple_get_int(ti, FIELD_LENGTH, NULL); ayemu_vtx_free (&tmp); - tuple_free(ti); + aud_tuple_free(ti); } } diff -r f86cb7fc1d4f -r 5fa26178eaef src/wav/wav-sndfile.c --- a/src/wav/wav-sndfile.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/wav/wav-sndfile.c Sun Oct 07 00:22:59 2007 -0500 @@ -104,14 +104,14 @@ realfn = g_filename_from_uri(filename, NULL, NULL); tmp_sndfile = sf_open (realfn ? realfn : filename, SFM_READ, &tmp_sfinfo); if ( sf_get_string(tmp_sndfile, SF_STR_TITLE) == NULL) - tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(realfn ? realfn : filename)); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(realfn ? realfn : filename)); else - tuple_associate_string(ti, FIELD_TITLE, NULL, sf_get_string(tmp_sndfile, SF_STR_TITLE)); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, sf_get_string(tmp_sndfile, SF_STR_TITLE)); - tuple_associate_string(ti, FIELD_ARTIST, NULL, sf_get_string(tmp_sndfile, SF_STR_ARTIST)); - tuple_associate_string(ti, FIELD_COMMENT, NULL, sf_get_string(tmp_sndfile, SF_STR_COMMENT)); - tuple_associate_string(ti, FIELD_DATE, NULL, sf_get_string(tmp_sndfile, SF_STR_DATE)); - tuple_associate_string(ti, -1, "software", sf_get_string(tmp_sndfile, SF_STR_SOFTWARE)); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, sf_get_string(tmp_sndfile, SF_STR_ARTIST)); + aud_tuple_associate_string(ti, FIELD_COMMENT, NULL, sf_get_string(tmp_sndfile, SF_STR_COMMENT)); + aud_tuple_associate_string(ti, FIELD_DATE, NULL, sf_get_string(tmp_sndfile, SF_STR_DATE)); + aud_tuple_associate_string(ti, -1, "software", sf_get_string(tmp_sndfile, SF_STR_SOFTWARE)); g_free(realfn); realfn = NULL; @@ -122,7 +122,7 @@ tmp_sndfile = NULL; if (tmp_sfinfo.samplerate > 0) - tuple_associate_int(ti, FIELD_LENGTH, NULL, (int) ceil (1000.0 * tmp_sfinfo.frames / tmp_sfinfo.samplerate)); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, (int) ceil (1000.0 * tmp_sfinfo.frames / tmp_sfinfo.samplerate)); switch (tmp_sfinfo.format & SF_FORMAT_TYPEMASK) { @@ -279,12 +279,12 @@ g_string_append_printf(codec_gs, "%s", format); codec = g_strdup(codec_gs->str); g_string_free(codec_gs, TRUE); - tuple_associate_string(ti, FIELD_CODEC, NULL, codec); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, codec); if (lossy != 0) - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); else - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossless"); } static gchar *get_title(char *filename) @@ -292,16 +292,16 @@ Tuple *tuple; gchar *title; - tuple = tuple_new_from_filename(filename); + tuple = aud_tuple_new_from_filename(filename); fill_song_tuple(filename, tuple); - title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); if (*title == '\0') { g_free(title); - title = g_strdup(tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); + title = g_strdup(aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); } - tuple_free(tuple); + aud_tuple_free(tuple); return title; } @@ -512,7 +512,7 @@ static Tuple* get_song_tuple (gchar *filename) { - Tuple *ti = tuple_new_from_filename(filename); + Tuple *ti = aud_tuple_new_from_filename(filename); fill_song_tuple(filename, ti); return ti; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/wav/wav.c --- a/src/wav/wav.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/wav/wav.c Sun Oct 07 00:22:59 2007 -0500 @@ -179,19 +179,19 @@ Tuple *tuple; gchar *title; - tuple = tuple_new_from_filename(filename); + tuple = aud_tuple_new_from_filename(filename); - tuple_associate_string(tuple, FIELD_CODEC, NULL, "RIFF/WAV Audio (ADPCM)"); - tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossless"); + aud_tuple_associate_string(tuple, FIELD_CODEC, NULL, "RIFF/WAV Audio (ADPCM)"); + aud_tuple_associate_string(tuple, FIELD_QUALITY, NULL, "lossless"); - title = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + title = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); if (*title == '\0') { g_free(title); - title = g_strdup(tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); + title = g_strdup(aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); } - tuple_free(tuple); + aud_tuple_free(tuple); return title; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/wavpack/libwavpack.cxx --- a/src/wavpack/libwavpack.cxx Wed Oct 03 17:24:59 2007 +0200 +++ b/src/wavpack/libwavpack.cxx Sun Oct 07 00:22:59 2007 -0500 @@ -392,28 +392,28 @@ } static Tuple * -tuple_from_WavpackContext(const char *fn, WavpackContext *ctx) +aud_tuple_from_WavpackContext(const char *fn, WavpackContext *ctx) { ape_tag tag; Tuple *ti; int sample_rate = WavpackGetSampleRate(ctx); - ti = tuple_new_from_filename(fn); + ti = aud_tuple_new_from_filename(fn); load_tag(&tag, ctx); - tuple_associate_string(ti, FIELD_TITLE, NULL, tag.title); - tuple_associate_string(ti, FIELD_ARTIST, NULL, tag.artist); - tuple_associate_string(ti, FIELD_ALBUM, NULL, tag.album); - tuple_associate_string(ti, FIELD_GENRE, NULL, tag.genre); - tuple_associate_string(ti, FIELD_COMMENT, NULL, tag.comment); - tuple_associate_string(ti, FIELD_DATE, NULL, tag.year); - tuple_associate_string(ti, FIELD_QUALITY, NULL, WavpackPluginGetQualityString(ctx).c_str()); - tuple_associate_string(ti, FIELD_CODEC, NULL, "WavPack"); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tag.title); + aud_tuple_associate_string(ti, FIELD_ARTIST, NULL, tag.artist); + aud_tuple_associate_string(ti, FIELD_ALBUM, NULL, tag.album); + aud_tuple_associate_string(ti, FIELD_GENRE, NULL, tag.genre); + aud_tuple_associate_string(ti, FIELD_COMMENT, NULL, tag.comment); + aud_tuple_associate_string(ti, FIELD_DATE, NULL, tag.year); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, WavpackPluginGetQualityString(ctx).c_str()); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "WavPack"); - tuple_associate_int(ti, FIELD_TRACK_NUMBER, NULL, atoi(tag.track)); - tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(tag.year)); - tuple_associate_int(ti, FIELD_LENGTH, NULL, (int)(WavpackGetNumSamples(ctx) / sample_rate) * 1000); + aud_tuple_associate_int(ti, FIELD_TRACK_NUMBER, NULL, atoi(tag.track)); + aud_tuple_associate_int(ti, FIELD_YEAR, NULL, atoi(tag.year)); + aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, (int)(WavpackGetNumSamples(ctx) / sample_rate) * 1000); return ti; } @@ -424,13 +424,13 @@ static char *displaytitle = NULL; Tuple *ti; - ti = tuple_from_WavpackContext(fn, ctx); + ti = aud_tuple_from_WavpackContext(fn, ctx); - displaytitle = tuple_formatter_make_title_string(ti, cfg.gentitle_format); + displaytitle = aud_tuple_formatter_make_title_string(ti, cfg.gentitle_format); if (!displaytitle || *displaytitle == '\0') displaytitle = g_strdup(fn); - tuple_free((void *) ti); + aud_tuple_free((void *) ti); return displaytitle; } @@ -446,7 +446,7 @@ return NULL; } - ti = tuple_from_WavpackContext(filename, d.ctx); + ti = aud_tuple_from_WavpackContext(filename, d.ctx); return ti; } @@ -460,7 +460,7 @@ if (!d.attach(filename, file)) return NULL; - ti = tuple_from_WavpackContext(filename, d.ctx); + ti = aud_tuple_from_WavpackContext(filename, d.ctx); return ti; } diff -r f86cb7fc1d4f -r 5fa26178eaef src/wma/wma.c --- a/src/wma/wma.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/wma/wma.c Sun Oct 07 00:22:59 2007 -0500 @@ -246,25 +246,25 @@ static void _assoc_string(Tuple *tuple, const gint nfield, const gchar *str) { if (strlen(str) > 0) - tuple_associate_string(tuple, nfield, NULL, str); + aud_tuple_associate_string(tuple, nfield, NULL, str); } static void _assoc_int(Tuple *tuple, const gint nfield, const gint val) { if (val > 0) - tuple_associate_int(tuple, nfield, NULL, val); + aud_tuple_associate_int(tuple, nfield, NULL, val); } static Tuple *wma_get_song_tuple(gchar * filename) { - Tuple *ti = tuple_new_from_filename(filename); + Tuple *ti = aud_tuple_new_from_filename(filename); AVFormatContext *in = NULL; if (av_open_input_file(&in, str_twenty_to_space(filename), NULL, 0, NULL) < 0) return NULL; - tuple_associate_string(ti, FIELD_CODEC, NULL, "Windows Media Audio (WMA)"); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Windows Media Audio (WMA)"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); av_find_stream_info(in); @@ -285,10 +285,10 @@ static gchar *get_song_title(AVFormatContext *in, gchar * filename) { gchar *ret = NULL; - Tuple *ti = tuple_new_from_filename(filename); + Tuple *ti = aud_tuple_new_from_filename(filename); - tuple_associate_string(ti, FIELD_CODEC, NULL, "Windows Media Audio (WMA)"); - tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); + aud_tuple_associate_string(ti, FIELD_CODEC, NULL, "Windows Media Audio (WMA)"); + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "lossy"); _assoc_string(ti, FIELD_TITLE, in->title); _assoc_string(ti, FIELD_ARTIST, in->author); @@ -299,7 +299,7 @@ _assoc_int(ti, FIELD_TRACK_NUMBER, in->track); _assoc_int(ti, FIELD_LENGTH, in->duration / 1000); - ret = tuple_formatter_make_title_string(ti, get_gentitle_format()); + ret = aud_tuple_formatter_make_title_string(ti, get_gentitle_format()); return ret; } @@ -319,8 +319,8 @@ if (tuple == NULL) return; - (*len_real) = tuple_get_int(tuple, FIELD_LENGTH, NULL); - (*title_real) = tuple_formatter_make_title_string(tuple, get_gentitle_format()); + (*len_real) = aud_tuple_get_int(tuple, FIELD_LENGTH, NULL); + (*title_real) = aud_tuple_formatter_make_title_string(tuple, get_gentitle_format()); } static void wma_playbuff(InputPlayback *playback, int out_size) diff -r f86cb7fc1d4f -r 5fa26178eaef src/xspf/xspf.c --- a/src/xspf/xspf.c Wed Oct 03 17:24:59 2007 +0200 +++ b/src/xspf/xspf.c Sun Oct 07 00:22:59 2007 -0500 @@ -132,9 +132,9 @@ Playlist *playlist = playlist_get_active(); - tuple = tuple_new(); - tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); - tuple_associate_int(tuple, FIELD_MTIME, NULL, -1); + tuple = aud_tuple_new(); + aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, -1); + aud_tuple_associate_int(tuple, FIELD_MTIME, NULL, -1); for (nptr = track->children; nptr != NULL; nptr = nptr->next) { @@ -172,11 +172,11 @@ xmlChar *str = xmlNodeGetContent(nptr); switch (xspf_entries[i].type) { case TUPLE_STRING: - tuple_associate_string(tuple, xspf_entries[i].tupleField, NULL, (gchar *)str); + aud_tuple_associate_string(tuple, xspf_entries[i].tupleField, NULL, (gchar *)str); break; case TUPLE_INT: - tuple_associate_int(tuple, xspf_entries[i].tupleField, NULL, atol((char *)str)); + aud_tuple_associate_int(tuple, xspf_entries[i].tupleField, NULL, atol((char *)str)); break; default: @@ -196,17 +196,17 @@ gchar *scratch; scratch = g_path_get_basename(location); - tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_FILE_NAME, NULL, scratch); g_free(scratch); scratch = g_path_get_dirname(location); - tuple_associate_string(tuple, FIELD_FILE_PATH, NULL, scratch); + aud_tuple_associate_string(tuple, FIELD_FILE_PATH, NULL, scratch); g_free(scratch); - tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, strrchr(location, '.')); + aud_tuple_associate_string(tuple, FIELD_FILE_EXT, NULL, strrchr(location, '.')); - XSDEBUG("tuple->file_name = %s\n", tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); - XSDEBUG("tuple->file_path = %s\n", tuple_get_string(tuple, FIELD_FILE_PATH, NULL)); + XSDEBUG("tuple->file_name = %s\n", aud_tuple_get_string(tuple, FIELD_FILE_NAME, NULL)); + XSDEBUG("tuple->file_path = %s\n", aud_tuple_get_string(tuple, FIELD_FILE_PATH, NULL)); // add file to playlist uri = g_filename_to_uri(location, NULL, NULL); @@ -504,7 +504,7 @@ switch (xs->type) { case TUPLE_STRING: - scratch = tuple_get_string(entry->tuple, xs->tupleField, NULL); + scratch = aud_tuple_get_string(entry->tuple, xs->tupleField, NULL); switch (xs->compare) { case CMP_DEF: isOK = (scratch != NULL); break; case CMP_NULL: isOK = (scratch == NULL); break; @@ -514,7 +514,7 @@ break; case TUPLE_INT: - scratchi = tuple_get_int(entry->tuple, xs->tupleField, NULL); + scratchi = aud_tuple_get_int(entry->tuple, xs->tupleField, NULL); switch (xs->compare) { case CMP_DEF: isOK = (scratchi != 0); break; case CMP_GT: isOK = (scratchi > 0); break; @@ -531,7 +531,7 @@ /* Write mtime unconditionally to support staticlist */ xspf_add_node(track, TUPLE_INT, TRUE, "mtime", NULL, - tuple_get_int(entry->tuple, FIELD_MTIME, NULL)); + aud_tuple_get_int(entry->tuple, FIELD_MTIME, NULL)); } else { if (entry->title != NULL && g_utf8_validate(entry->title, -1, NULL))