summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-11-21 06:07:13 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-11-21 06:08:23 -0500
commit12bc24adbf919dc945928b2dcda74d51d33708f7 (patch)
treee05c214820dcf1c1058cc0d3fce6323f34afdae2
parentaced667f48c29a160aa4e5c0a8df037092b28189 (diff)
downloadrockbox-12bc24a.tar.gz
rockbox-12bc24a.zip
aced667 forgot about those pesky __PCTOOL__ things.
It was so close to aced666. Change-Id: I2b952a0704bb2d006db5e3ea4a929db3118cf390
-rw-r--r--apps/misc.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/misc.c b/apps/misc.c
index bfe3e990f5..047098556f 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -1004,6 +1004,21 @@ void replaygain_update(void)
}
#endif /* CONFIG_CODEC == SWCODEC */
+/* format a sound value like: -1.05 dB */
+int format_sound_value(char *buf, size_t size, int snd, int val)
+{
+ int numdec = sound_numdecimals(snd);
+ const char *unit = sound_unit(snd);
+ int physval = sound_val2phys(snd, val);
+
+ unsigned int factor = ipow(10, numdec);
+ unsigned int av = abs(physval);
+ unsigned int i = av / factor;
+ unsigned int d = av - i*factor;
+ return snprintf(buf, size, "%c%u%.*s%.*u %s", " -"[physval < 0],
+ i, numdec, ".", numdec, d, unit);
+}
+
#endif /* !defined(__PCTOOL__) */
/* Read (up to) a line of text from fd into buffer and return number of bytes
@@ -1253,18 +1268,3 @@ enum current_activity get_current_activity(void)
}
#endif
-
-/* format a sound value like: -1.05 dB */
-int format_sound_value(char *buf, size_t size, int snd, int val)
-{
- int numdec = sound_numdecimals(snd);
- const char *unit = sound_unit(snd);
- int physval = sound_val2phys(snd, val);
-
- unsigned int factor = ipow(10, numdec);
- unsigned int av = abs(physval);
- unsigned int i = av / factor;
- unsigned int d = av - i*factor;
- return snprintf(buf, size, "%c%u%.*s%.*u %s", " -"[physval < 0],
- i, numdec, ".", numdec, d, unit);
-}