From: Martin Johansson Date: Mon, 26 Nov 2012 22:00:29 +0000 (+0100) Subject: Add Opus threshold config variable X-Git-Url: http://git.code-monkey.de/?p=umurmur.git;a=commitdiff_plain;h=772cee17b53bb6795a5e98f1ae2acb7e7d6c25c1 Add Opus threshold config variable --- diff --git a/src/conf.c b/src/conf.c index ccd8e05..efacd56 100644 --- a/src/conf.c +++ b/src/conf.c @@ -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); } diff --git a/src/conf.h b/src/conf.h index ea43e38..c9793eb 100644 --- a/src/conf.h +++ b/src/conf.h @@ -54,6 +54,7 @@ typedef enum param { ENABLE_BAN, BANFILE, SYNC_BANFILE, + OPUS_THRESHOLD, } param_t; typedef struct {