summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d5f088)
raw | patch | inline | side by side (parent: 6d5f088)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:48:52 +0000 (21:48 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 10 Mar 2017 20:48:52 +0000 (21:48 +0100) |
NEWS | patch | blob | history | |
src/screen_song.c | patch | blob | history |
index a4c5075057e3e5d833092bdfaa4dd7fcdc9644f0..58f1b88327ea0b7042d0bb817bf1d20429e0e443 100644 (file)
--- a/NEWS
+++ b/NEWS
* require libmpdclient 2.9
* adapt to lirc 0.9.4
* lyricswiki: update regex
+* screen_song: show "f" and "dsd" formats
* fix gcc 7 warnings
ncmpc 0.25 - (2016-08-18)
diff --git a/src/screen_song.c b/src/screen_song.c
index 03dc43d5ef178ff93c78709867fed5508d1cf17c..8250f1623d6949389b40df3cecc3ceab203fce84 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
audio_format_to_string(char *buffer, size_t size,
const struct mpd_audio_format *format)
{
+#if LIBMPDCLIENT_CHECK_VERSION(2,10,0)
+ if (format->bits == MPD_SAMPLE_FORMAT_FLOAT) {
+ g_snprintf(buffer, size, _("%u:f:%u"),
+ format->sample_rate,
+ format->channels);
+ return;
+ }
+
+ if (format->bits == MPD_SAMPLE_FORMAT_DSD) {
+ g_snprintf(buffer, size, _("%u:dsd:%u"),
+ format->sample_rate,
+ format->channels);
+ return;
+ }
+#endif
+
g_snprintf(buffer, size, _("%u:%u:%u"),
format->sample_rate, format->bits,
format->channels);