aboutsummaryrefslogtreecommitdiffstats
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 cd116c7..385253b 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -210,3 +210,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");
+ }
+}
+
+