summaryrefslogtreecommitdiff
path: root/apps/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.h')
-rw-r--r--apps/misc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/misc.h b/apps/misc.h
index 403a8c53ac..72b8735c8a 100644
--- a/apps/misc.h
+++ b/apps/misc.h
@@ -238,4 +238,12 @@ int core_load_bmp(const char *filename, struct bitmap *bm, const int bmformat,
238 ssize_t *buf_reqd, struct buflib_callbacks *ops); 238 ssize_t *buf_reqd, struct buflib_callbacks *ops);
239#endif 239#endif
240 240
241/* Convert a volume (in tenth dB) in the range [min_vol, max_vol]
242 * to a normalized linear value in the range [0, max_norm]. */
243long to_normalized_volume(long vol, long min_vol, long max_vol, long max_norm);
244
245/* Inverse of to_normalized_volume(), returns the volume in tenth dB
246 * for the given normalized volume. */
247long from_normalized_volume(long norm, long min_vol, long max_vol, long max_norm);
248
241#endif /* MISC_H */ 249#endif /* MISC_H */