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,
943 snprintf(buf, buf_size, "%ld", id3->frequency); 943 snprintf(buf, buf_size, "%ld", id3->frequency);
944 return buf; 944 return buf;
945 945
946 case WPS_TOKEN_FILE_FREQUENCY_KHZ:
947 /* ignore remainders < 100, so 22050 Hz becomes just 22k */
948 if ((id3->frequency % 1000) < 100)
949 snprintf(buf, buf_size, "%ld", id3->frequency / 1000);
950 else
951 snprintf(buf, buf_size, "%ld.%d",
952 id3->frequency / 1000,
953 (id3->frequency % 1000) / 100);
954 return buf;
955
946 case WPS_TOKEN_FILE_NAME: 956 case WPS_TOKEN_FILE_NAME:
947 if (get_dir(buf, buf_size, id3->path, 0)) { 957 if (get_dir(buf, buf_size, id3->path, 0)) {
948 /* Remove extension */ 958 /* Remove extension */