Mercurial > audlegacy-plugins
changeset 1478:dd05a74648a7
Improve ${codec} and ${quality} tuples.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Sat, 11 Aug 2007 23:51:50 -0500 |
parents | 04311d687e94 |
children | 7b3aa5513041 |
files | src/musepack/libmpc.cxx |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/musepack/libmpc.cxx Sat Aug 11 23:48:14 2007 -0500 +++ b/src/musepack/libmpc.cxx Sat Aug 11 23:51:50 2007 -0500 @@ -367,9 +367,6 @@ tuple_associate_string(tuple, "genre", tags.genre); tuple_associate_string(tuple, "comment", tags.comment); - tuple_associate_string(tuple, "codec", "Musepack"); - tuple_associate_string(tuple, "quality", "lossy"); - freeTags(tags); mpc_streaminfo info; @@ -378,6 +375,15 @@ mpc_streaminfo_read(&info, &reader.reader); tuple_associate_int(tuple, "length", static_cast<int> (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, "codec", scratch); + g_free(scratch); + + scratch = g_strdup_printf("lossy (%s)", info.profile_name); + tuple_associate_string(tuple, "quality", scratch); + g_free(scratch); + vfs_fclose(input); } else