Update copyright year.
[umurmur.git] / src / conf.c
index ccd8e05cde4dfefe3f8d7bd468569de9ddca24ad..a110056d3e1cef926fc9a11bacf4c451ee7ddcd4 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009-2012, Martin Johansson <martin@fatbob.nu>
-   Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2013, Martin Johansson <martin@fatbob.nu>
+   Copyright (C) 2005-2013, Thorvald Natvig <thorvald@natvig.com>
 
    All rights reserved.
 
@@ -45,6 +45,7 @@ static config_t configuration;
 #define DEFAULT_MAX_BANDWIDTH 48000
 #define DEFAULT_BINDPORT 64738
 #define DEFAULT_BAN_LENGTH (60*60)
+#define DEFAULT_OPUS_THRESHOLD 100
 
 const char defaultconfig[] = DEFAULT_CONFIG;
 
@@ -250,6 +251,14 @@ int getIntConf(param_t param)
                        return config_setting_get_int(setting);
                }
                break;
+       case OPUS_THRESHOLD:
+               setting = config_lookup(&configuration, "opus_threshold");
+               if (!setting)
+                       return DEFAULT_OPUS_THRESHOLD;
+               else {
+                       return config_setting_get_int(setting);
+               }
+               break;
        default:
                doAssert(false);
        }