aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-08-23 15:42:51 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2021-08-23 15:44:00 +0200
commit2bd4bc94f62fca776384a87b73f33b658b830400 (patch)
tree79626ffc2386f140c5a382d7350c293c49de8ebd
parent11da4a4abde8fa3db07492e7f6695667fe4c4be9 (diff)
codec: add missing osmo_amr_type_name function.
We have value strings for osmo_amr_type, but we do not have a function that returns us the strings. Change-Id: I694f56b032537440db6264df5e6a6aa3a2992175
-rw-r--r--include/osmocom/codec/codec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index cbdad75e..58e3a296 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -47,6 +47,9 @@ enum osmo_amr_type {
AMR_NO_DATA = 15,
};
+static inline const char *osmo_amr_type_name(enum osmo_amr_type type)
+{ return get_value_string(osmo_amr_type_names, type); }
+
enum osmo_amr_quality {
AMR_BAD = 0,
AMR_GOOD = 1