diff --git a/src/engine/client/ec_snd.c b/src/engine/client/ec_snd.c index 3e29697cc..ac41ec599 100644 --- a/src/engine/client/ec_snd.c +++ b/src/engine/client/ec_snd.c @@ -261,7 +261,7 @@ int snd_init() format.freq = config.snd_rate; format.format = AUDIO_S16; format.channels = 2; - format.samples = 512; /* A good value for games */ + format.samples = config.snd_buffer_size; format.callback = sdlcallback; format.userdata = NULL; diff --git a/src/engine/e_config_variables.h b/src/engine/e_config_variables.h index 69002a507..019895423 100644 --- a/src/engine/e_config_variables.h +++ b/src/engine/e_config_variables.h @@ -26,6 +26,7 @@ MACRO_CONFIG_INT(b_sort, 0, 0, 256, CFGFLAG_SAVE|CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(b_sort_order, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "") MACRO_CONFIG_INT(b_max_requests, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Number of requests to use when refreshing server browser") +MACRO_CONFIG_INT(snd_buffer_size, 512, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound buffer size") MACRO_CONFIG_INT(snd_rate, 48000, 0, 0, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound mixing rate") MACRO_CONFIG_INT(snd_enable, 1, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound enable") MACRO_CONFIG_INT(snd_volume, 100, 0, 100, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Sound volume")