summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 2429d74b86..5524c1490e 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -943,6 +943,16 @@ static char *get_token_value(struct gui_wps *gwps,
snprintf(buf, buf_size, "%ld", id3->frequency);
return buf;
+ case WPS_TOKEN_FILE_FREQUENCY_KHZ:
+ /* ignore remainders < 100, so 22050 Hz becomes just 22k */
+ if ((id3->frequency % 1000) < 100)
+ snprintf(buf, buf_size, "%ld", id3->frequency / 1000);
+ else
+ snprintf(buf, buf_size, "%ld.%d",
+ id3->frequency / 1000,
+ (id3->frequency % 1000) / 100);
+ return buf;
+
case WPS_TOKEN_FILE_NAME:
if (get_dir(buf, buf_size, id3->path, 0)) {
/* Remove extension */