summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:38:21 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-10-11 17:38:21 +0200
commit52003d97f6c92d15607ef0d4f1e953f342ccd51e (patch)
treef36cde622a61ea7544aef2913e31768ba9976015 /main.c
parent4326a465afb45622d22d2dd52fe6f4d25f1a17ef (diff)
experimental kbps display in statusbar
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index 7434e4fc..1406cc75 100644
--- a/main.c
+++ b/main.c
@@ -120,7 +120,12 @@ update_songinfo (void) {
strcpy (t, "-:--");
}
- snprintf (sbtext_new, sizeof (sbtext_new), "[%s] %dHz | %d bit | %s | %d:%02d / %s | %d songs | %d:%02d total playtime", str_playing_song.filetype ? str_playing_song.filetype:"-", samplerate, bitspersample, mode, minpos, secpos, t, pl_getcount (), mintotal, sectotal);
+ int bitrate = streamer_get_bitrate ();
+ char sbitrate[20] = "";
+ if (bitrate > 0) {
+ snprintf (sbitrate, sizeof (sbitrate), "%d kbps ", bitrate);
+ }
+ snprintf (sbtext_new, sizeof (sbtext_new), "[%s] %s| %dHz | %d bit | %s | %d:%02d / %s | %d songs | %d:%02d total playtime", str_playing_song.filetype ? str_playing_song.filetype:"-", sbitrate, samplerate, bitspersample, mode, minpos, secpos, t, pl_getcount (), mintotal, sectotal);
}
if (strcmp (sbtext_new, sb_text)) {