summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55d4e85)
raw | patch | inline | side by side (parent: 55d4e85)
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | |
Mon, 9 Jun 2014 09:17:44 +0000 (11:17 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 9 Jun 2014 09:17:44 +0000 (11:17 +0200) |
NEWS | patch | blob | history | |
src/screen_song.c | patch | blob | history |
index cf73d0ae3c77650fe0c433534b3788d6217056ae..ca5cfd6d47316f820fc9b920db0bc1d121489b5b 100644 (file)
--- a/NEWS
+++ b/NEWS
* patched color line-flags
* configuration option "search-format"
* remove broken leoslyrics plugin
+* show audio format in song screen
ncmpc 0.21 - (2013-04-11)
diff --git a/src/screen_song.c b/src/screen_song.c
index 6d3a0342a7c592eed21b0083e05915592db900e9..2a69860ae33e9466c96ec89e02cee843d0773fd7 100644 (file)
--- a/src/screen_song.c
+++ b/src/screen_song.c
LABEL_LENGTH = MPD_TAG_COUNT,
LABEL_PATH,
LABEL_BITRATE,
+ LABEL_FORMAT,
LABEL_POSITION,
};
[MPD_TAG_COMMENT] = N_("Comment"),
[LABEL_PATH] = N_("Path"),
[LABEL_BITRATE] = N_("Bitrate"),
+ [LABEL_FORMAT] = N_("Format"),
};
static unsigned max_tag_label_width;
mpd_status_get_kbit_rate(c->status));
screen_song_append(_(tag_labels[LABEL_BITRATE]), buf,
max_tag_label_width);
+
+ const struct mpd_audio_format *format =
+ mpd_status_get_audio_format(c->status);
+ if (format) {
+ g_snprintf(buf, sizeof(buf), _("%u:%u:%u"),
+ format->sample_rate, format->bits,
+ format->channels);
+ screen_song_append(_(tag_labels[LABEL_FORMAT]), buf,
+ max_tag_label_width);
+ }
}
}