return true;
}
-void __config_changed_cb(tts_config_type_e type, const char* str_param, int int_param)
+void __config_changed_cb(tts_config_type_e type, const char* str_param, int int_param, double double_param)
{
switch (type) {
case TTS_CONFIG_TYPE_ENGINE:
}
break;
}
+
+ case TTS_CONFIG_TYPE_BACKGROUND_VOLUME_RATIO:
+ {
+ if (0.0 <= double_param && double_param <= 1.0) {
+ /* set default bg volume ratio */
+ int ret = 0;
+ ret = ttsd_player_set_background_volume_ratio(double_param);
+ if (0 != ret) {
+ SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set default bg volume ratio : result(%d)", ret);
+ }
+ }
+ break;
+ }
}
return;
SLOG(LOG_ERROR, tts_tag(), "[Server WARNING] Fail to initialize config.");
}
+ double ratio;
+ if (0 == ttsd_config_get_bg_volume_ratio(&ratio))
+ {
+ SLOG(LOG_ERROR, tts_tag(), "[Server] get bg volume ratio is %lf", ratio);
+ int ret = ttsd_player_set_background_volume_ratio(ratio);
+ if (0 != ret)
+ SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set bg volume ratio : result(%d)", ret);
+ }
+ else
+ SLOG(LOG_ERROR, tts_tag(), "[Server WARNING] Fail to get bg volume ratio");
+
/* player init */
if (ttsd_player_init()) {
SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to initialize player init.");