summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ced4877)
raw | patch | inline | side by side (parent: ced4877)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:50:20 +0000 (21:50 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:50:20 +0000 (21:50 +0100) |
src/screen_song.c | patch | blob | history |
diff --git a/src/screen_song.c b/src/screen_song.c
index 8250f1623d6949389b40df3cecc3ceab203fce84..6814dcddbaa7e38aa489068396a540d2a73b4513 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
}
if (format->bits == MPD_SAMPLE_FORMAT_DSD) {
+ if (format->sample_rate > 0 &&
+ format->sample_rate % 44100 == 0) {
+ /* use shortcuts such as "dsd64" which implies the
+ sample rate */
+ g_snprintf(buffer, size, _("dsd%u:%u"),
+ format->sample_rate * 8 / 44100,
+ format->channels);
+ return;
+ }
+
g_snprintf(buffer, size, _("%u:dsd:%u"),
format->sample_rate,
format->channels);