mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-01 16:16:46 +02:00
Implement simplistic VAD
This commit is contained in:
@ -204,19 +204,19 @@ static const struct audio_strings {
|
||||
const char *self;
|
||||
const char *input_device;
|
||||
const char *output_device;
|
||||
const char *VAD_treshold;
|
||||
const char *VAD_threshold;
|
||||
} audio_strings = {
|
||||
"audio",
|
||||
"input_device",
|
||||
"output_device",
|
||||
"VAD_treshold",
|
||||
"VAD_threshold",
|
||||
};
|
||||
|
||||
static void audio_defaults(struct user_settings *settings)
|
||||
{
|
||||
settings->audio_in_dev = 0;
|
||||
settings->audio_out_dev = 0;
|
||||
settings->VAD_treshold = 40.0;
|
||||
settings->VAD_threshold = 5.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -505,7 +505,7 @@ int settings_load(struct user_settings *s, const char *patharg)
|
||||
config_setting_lookup_int(setting, audio_strings.output_device, &s->audio_out_dev);
|
||||
s->audio_out_dev = s->audio_out_dev < 0 || s->audio_out_dev > MAX_DEVICES ? 0 : s->audio_out_dev;
|
||||
|
||||
config_setting_lookup_float(setting, audio_strings.VAD_treshold, &s->VAD_treshold);
|
||||
config_setting_lookup_float(setting, audio_strings.VAD_threshold, &s->VAD_threshold);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user