# HG changeset patch # User Yoshiki Yazawa # Date 1234371009 -32400 # Node ID 4d778b7a19c664491f460fc393fe14eb9f81bfe5 # Parent d116c0d61dd27205b4ffa7ac6e9153079f72cc12 now sndfile can display Japanese file name. diff -r d116c0d61dd2 -r 4d778b7a19c6 src/sndfile/plugin.c --- a/src/sndfile/plugin.c Wed Nov 26 05:17:55 2008 +0900 +++ b/src/sndfile/plugin.c Thu Feb 12 01:50:09 2009 +0900 @@ -143,8 +143,10 @@ gchar *codec, *format, *subformat; tmp_sndfile = open_sndfile_from_uri(filename, &vfsfile, &tmp_sfinfo); - if ( sf_get_string(tmp_sndfile, SF_STR_TITLE) == NULL) - aud_tuple_associate_string(ti, FIELD_TITLE, NULL, g_path_get_basename(filename)); + if ( sf_get_string(tmp_sndfile, SF_STR_TITLE) == NULL) { + gchar *utfname = aud_uri_to_display_basename(filename); + aud_tuple_associate_string(ti, FIELD_TITLE, NULL, utfname); + } else aud_tuple_associate_string(ti, FIELD_TITLE, NULL, sf_get_string(tmp_sndfile, SF_STR_TITLE)); @@ -227,7 +229,7 @@ default: format = "Unknown sndfile"; } - + switch (tmp_sfinfo.format & SF_FORMAT_SUBMASK) { case SF_FORMAT_PCM_S8: @@ -319,7 +321,7 @@ codec = g_strdup_printf("%s", format); aud_tuple_associate_string(ti, FIELD_CODEC, NULL, codec); g_free(codec); - + aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, lossy ? "lossy" : "lossless"); }