summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-09-29 21:39:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-09-29 21:39:39 +0000
commit09ee5d9967328c1fabd4aca7766f9613acd8ee5e (patch)
treea64a893aa4184475d9799d76daaefd60b8e88eb1 /libs/ardour/utils.cc
parent7adf76bbe61435dcd6859895f4cadd4feb797f18 (diff)
many important changes to configuration system and specific parameters
git-svn-id: svn://localhost/ardour2/trunk@935 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc64
1 files changed, 64 insertions, 0 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 574e7a6587..d8642486d9 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -298,6 +298,32 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out)
}
}
+EditMode
+string_to_edit_mode (string str)
+{
+ if (str == _("Splice Edit")) {
+ return Splice;
+ } else if (str == _("Slide Edit")) {
+ return Slide;
+ }
+ fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg;
+ /*NOTREACHED*/
+ return Slide;
+}
+
+const char*
+edit_mode_to_string (EditMode mode)
+{
+ switch (mode) {
+ case Slide:
+ return _("Slide Edit");
+
+ default:
+ case Splice:
+ return _("Splice Edit");
+ }
+}
+
SlaveSource
string_to_slave_source (string str)
{
@@ -334,3 +360,41 @@ slave_source_to_string (SlaveSource src)
}
}
+
+float
+meter_falloff_to_float (MeterFalloff falloff)
+{
+ switch (falloff) {
+ case MeterFalloffOff:
+ return 0.0f;
+ case MeterFalloffSlowest:
+ return 1.0f;
+ case MeterFalloffSlow:
+ return 2.0f;
+ case MeterFalloffMedium:
+ return 3.0f;
+ case MeterFalloffFast:
+ return 4.0f;
+ case MeterFalloffFaster:
+ return 5.0f;
+ case MeterFalloffFastest:
+ default:
+ return 6.0f;
+ }
+}
+
+float
+meter_hold_to_float (MeterHold hold)
+{
+ switch (hold) {
+ case MeterHoldOff:
+ return 0.0f;
+ case MeterHoldShort:
+ return 40.0f;
+ case MeterHoldMedium:
+ return 100.0f;
+ case MeterHoldLong:
+ default:
+ return 200.0f;
+ }
+}