Mercurial > audlegacy-plugins
diff src/sndfile/plugin.c @ 2975:4d778b7a19c6
now sndfile can display Japanese file name.
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Thu, 12 Feb 2009 01:50:09 +0900 |
| parents | 3134a0987162 |
| children | e2e8f927a08a |
line wrap: on
line diff
--- 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"); }
