summaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index f423dc1..f113be3 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -214,3 +214,17 @@ double parseChannel(const std::string& chan)
}
return freq;
}
+
+int transmission_frame_duration_ms(unsigned int dabMode)
+{
+ switch (dabMode) {
+ case 1: return 96;
+ case 2: return 24;
+ case 3: return 24;
+ case 4: return 48;
+ default:
+ throw std::runtime_error("invalid DAB mode");
+ }
+}
+
+