vc_mgr_tidl.c
vc_mgr_proxy.c
vc_mgr_stub.c
- vc_mgr_ducking.c
+ vc_mgr_ducking.cpp
../common/vc_cmd_db.c
../common/vc_command.c
../common/vc_command_util.c
int vc_mgr_change_background_volume(vc_background_volume_event_e event)
{
- SLOG(LOG_INFO, TAG_VCM, "[Manager] Change system volume");
+ SLOG(LOG_INFO, TAG_VCM, "[Manager] Change background volume. event(%d)", event);
int ret;
ret = __check_mgr_feature_privilege();
vc_state_e state = VC_STATE_NONE;
ret = vc_mgr_client_get_client_state(g_vc_m, &state);
- if (0 != ret) {
+ if (VC_ERROR_NONE != ret) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
return VC_ERROR_INVALID_STATE;
}
double ratio = 0.0;
if (VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_FARFIELD == event)
- ratio = 0.0;
+ ratio = VC_MGR_DEFAULT_FARFIELD_DUCKING_RATIO;
else if (VC_BACKGROUND_VOLUME_EVENT_CHANGE_FOR_NEARFIELD == event)
- ratio = 0.7;
+ ratio = VC_MGR_DEFAULT_NEARFIELD_DUCKING_RATIO;
ret = vc_mgr_ducking_activate(ratio);
- if (0 != ret)
+ if (VC_ERROR_NONE != ret)
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to change volume");
else
SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to change volume");
int vc_mgr_change_background_volume_by_ratio(double ratio)
{
- SLOG(LOG_INFO, TAG_VCM, "[Manager] Change system volume");
+ SLOG(LOG_INFO, TAG_VCM, "[Manager] Change background volume. ratio(%f)", ratio);
int ret;
ret = __check_mgr_feature_privilege();
if (VC_ERROR_NONE != ret)
return ret;
- if (0.0 > ratio || 1.0 < ratio) {
+ if (VC_MGR_MINIMUM_DUCKING_RATIO > ratio || VC_MGR_MAXIMUM_DUCKING_RATIO < ratio) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] ratio is invalid parameter (%lf)", ratio);
return VC_ERROR_INVALID_PARAMETER;
}
vc_state_e state = VC_STATE_NONE;
ret = vc_mgr_client_get_client_state(g_vc_m, &state);
- if (0 != ret) {
+ if (VC_ERROR_NONE != ret) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
return VC_ERROR_INVALID_STATE;
}
}
ret = vc_mgr_ducking_activate(ratio);
- if (0 != ret)
+ if (VC_ERROR_NONE != ret)
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to set ratio");
else
SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to set ratio");
+
return ret;
}
int vc_mgr_reset_background_volume(void)
{
- SLOG(LOG_INFO, TAG_VCM, "[Manager] recover system volume");
+ SLOG(LOG_INFO, TAG_VCM, "[Manager] Recover background volume");
int ret;
ret = __check_mgr_feature_privilege();
vc_state_e state = VC_STATE_NONE;
ret = vc_mgr_client_get_client_state(g_vc_m, &state);
- if (0 != ret) {
+ if (VC_ERROR_NONE != ret) {
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] A handle is not available");
return VC_ERROR_INVALID_STATE;
}
}
ret = vc_mgr_ducking_deactivate();
- if (0 != ret)
+ if (VC_ERROR_NONE != ret)
SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to recover volume");
else
SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to recover volume");
+
return ret;
}
+++ /dev/null
-/*
-* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-#include "vc_main.h"
-#include "voice_control_common.h"
-#include "vc_mgr_ducking.h"
-#include <sound_manager.h>
-
-#define SND_MGR_DUCKING_DURATION 500
-
-/* for changing volume on each sound stream */
-static sound_stream_ducking_h g_media_stream_h = NULL;
-static sound_stream_ducking_h g_system_stream_h = NULL;
-static sound_stream_ducking_h g_notification_stream_h = NULL;
-static sound_stream_ducking_h g_alarm_stream_h = NULL;
-
-static char *__get_ducking_stream(sound_stream_type_e stream_type);
-static int __activate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header, double ratio);
-static int __deactivate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header);
-
-int vc_mgr_ducking_create(void)
-{
- int ret = VC_ERROR_NONE;
-
- if (g_media_stream_h) {
- SLOG(LOG_INFO, TAG_VCM, "Ducking handle for media stream is already created");
- } else {
- ret = sound_manager_create_stream_ducking(SOUND_STREAM_TYPE_MEDIA, NULL, NULL, &g_media_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret) {
- g_media_stream_h = NULL;
- SLOG(LOG_ERROR, TAG_VCM, "Fail to create stream ducking for type media, ret(%d)", ret);
- return ret;
- }
- }
-
- if (g_system_stream_h) {
- SLOG(LOG_INFO, TAG_VCM, "Ducking handle for system stream is already created");
- } else {
- ret = sound_manager_create_stream_ducking(SOUND_STREAM_TYPE_SYSTEM, NULL, NULL, &g_system_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret) {
- sound_manager_destroy_stream_ducking(g_media_stream_h);
- g_media_stream_h = NULL;
- g_system_stream_h = NULL;
- SLOG(LOG_ERROR, TAG_VCM, "Fail to create stream ducking for type system, ret(%d)", ret);
- return ret;
- }
- }
-
- if (g_notification_stream_h) {
- SLOG(LOG_INFO, TAG_VCM, "Ducking handle for notification stream is already created");
- } else {
- ret = sound_manager_create_stream_ducking(SOUND_STREAM_TYPE_NOTIFICATION, NULL, NULL, &g_notification_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret) {
- sound_manager_destroy_stream_ducking(g_media_stream_h);
- sound_manager_destroy_stream_ducking(g_system_stream_h);
- g_media_stream_h = NULL;
- g_system_stream_h = NULL;
- g_notification_stream_h = NULL;
- SLOG(LOG_ERROR, TAG_VCM, "Fail to create stream ducking for type notification, ret(%d)", ret);
- return ret;
- }
- }
-
- if (g_alarm_stream_h) {
- SLOG(LOG_INFO, TAG_VCM, "Ducking handle for alarm stream is already created");
- } else {
- ret = sound_manager_create_stream_ducking(SOUND_STREAM_TYPE_ALARM, NULL, NULL, &g_alarm_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret) {
- sound_manager_destroy_stream_ducking(g_media_stream_h);
- sound_manager_destroy_stream_ducking(g_system_stream_h);
- sound_manager_destroy_stream_ducking(g_system_stream_h);
- g_media_stream_h = NULL;
- g_system_stream_h = NULL;
- g_notification_stream_h = NULL;
- g_alarm_stream_h = NULL;
- SLOG(LOG_ERROR, TAG_VCM, "Fail to create stream ducking for type media, ret(%d)", ret);
- return ret;
- }
- }
-
- return VC_ERROR_NONE;
-}
-
-int vc_mgr_ducking_destroy(void)
-{
- int ret = VC_ERROR_NONE;
-
- if (g_media_stream_h) {
- ret = sound_manager_destroy_stream_ducking(g_media_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_WARN, TAG_VCM, "Fail to destroy media stream ducking, ret(%d)", ret);
- g_media_stream_h = NULL;
- } else {
- SLOG(LOG_INFO, TAG_VCM, "[Volume INFO] Ducking handle for media stream is already created");
- }
-
- if (g_system_stream_h) {
- ret = sound_manager_destroy_stream_ducking(g_system_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_WARN, TAG_VCM, "[Volume WARNING] Fail to destroy system stream ducking, ret(%d)", ret);
- g_system_stream_h = NULL;
- } else {
- SLOG(LOG_INFO, TAG_VCM, "[Volume INFO] Ducking handle for system stream is already created");
- }
-
- if (g_notification_stream_h) {
- ret = sound_manager_destroy_stream_ducking(g_notification_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_WARN, TAG_VCM, "[Volume WARNING] Fail to destroy notification stream ducking, ret(%d)", ret);
- g_notification_stream_h = NULL;
- } else {
- SLOG(LOG_INFO, TAG_VCM, "[Volume INFO] Ducking handle for notification stream is already created");
- }
-
- if (g_alarm_stream_h) {
- ret = sound_manager_destroy_stream_ducking(g_alarm_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_WARN, TAG_VCM, "[Volume WARNING] Fail to destroy alarm stream ducking, ret(%d)", ret);
- g_alarm_stream_h = NULL;
- } else {
- SLOG(LOG_INFO, TAG_VCM, "[Volume INFO] Ducking handle for alarm stream is already created");
- }
-
- return VC_ERROR_NONE;
-}
-
-int vc_mgr_ducking_activate(double ratio)
-{
- SLOG(LOG_INFO, TAG_VCM, "vc_mgr_ducking_activate ratio(%lf)", ratio);
-
- int ret = VC_ERROR_NONE;
- ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_MEDIA, g_media_stream_h, ratio);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_SYSTEM, g_system_stream_h, ratio);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_NOTIFICATION, g_notification_stream_h, ratio);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_ALARM, g_alarm_stream_h, ratio);
- return ret;
-}
-
-int vc_mgr_ducking_deactivate(void)
-{
- SLOG(LOG_INFO, TAG_VCM, "vc_mgr_ducking_deactivate");
-
- int ret = VC_ERROR_NONE;
- ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_MEDIA, g_media_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_SYSTEM, g_system_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_NOTIFICATION, g_notification_stream_h);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- return ret;
- ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_ALARM, g_alarm_stream_h);
- return ret;
-}
-
-static char *__get_ducking_stream(sound_stream_type_e stream_type)
-{
- if (SOUND_STREAM_TYPE_MEDIA == stream_type)
- return "Media stream";
- else if (SOUND_STREAM_TYPE_SYSTEM == stream_type)
- return "System stream";
- else if (SOUND_STREAM_TYPE_NOTIFICATION == stream_type)
- return "Notification stream";
- else if (SOUND_STREAM_TYPE_ALARM == stream_type)
- return "Alarm stream";
- return "Non matched stream";
-}
-
-static int __activate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header, double ratio)
-{
- bool is_ducked = false;
- int ret = SOUND_MANAGER_ERROR_NONE;
- ret = sound_manager_is_ducked(header, &is_ducked);
- if (is_ducked) {
- SLOG(LOG_DEBUG, TAG_VCM, "The %s is already ducked", __get_ducking_stream(type));
- return ret;
- }
-
- ret = sound_manager_activate_ducking(header, SND_MGR_DUCKING_DURATION, ratio);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_ERROR, TAG_VCM, "Fail to activate ducking for %s", __get_ducking_stream(type));
- else
- SLOG(LOG_INFO, TAG_VCM, "Activate ducking for %s", __get_ducking_stream(type));
- return ret;
-}
-
-static int __deactivate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header)
-{
- bool is_ducked = false;
- int ret = SOUND_MANAGER_ERROR_NONE;
- ret = sound_manager_is_ducked(header, &is_ducked);
- if (false == is_ducked) {
- SLOG(LOG_DEBUG, TAG_VCM, "The %s is already recovered from ducking", __get_ducking_stream(type));
- return ret;
- }
-
- ret = sound_manager_deactivate_ducking(header);
- if (SOUND_MANAGER_ERROR_NONE != ret)
- SLOG(LOG_ERROR, TAG_VCM, "Fail to deactivate ducking for %s", __get_ducking_stream(type));
- else
- SLOG(LOG_INFO, TAG_VCM, "Deactivate ducking for %s", __get_ducking_stream(type));
- return ret;
-}
--- /dev/null
+/*
+* Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#include <sound_manager.h>
+
+#include "vc_main.h"
+
+#include "vc_mgr_ducking.h"
+
+#define SND_MGR_DUCKING_DURATION 500
+
+/* for changing volume on each sound stream */
+static sound_stream_ducking_h g_media_stream_h = nullptr;
+static sound_stream_ducking_h g_system_stream_h = nullptr;
+static sound_stream_ducking_h g_notification_stream_h = nullptr;
+static sound_stream_ducking_h g_alarm_stream_h = nullptr;
+static sound_stream_ducking_h g_voice_information_stream_h = nullptr;
+
+static bool g_is_created = false;
+
+
+static const char *__get_ducking_stream(sound_stream_type_e stream_type)
+{
+ if (SOUND_STREAM_TYPE_MEDIA == stream_type)
+ return "Media stream";
+ else if (SOUND_STREAM_TYPE_SYSTEM == stream_type)
+ return "System stream";
+ else if (SOUND_STREAM_TYPE_NOTIFICATION == stream_type)
+ return "Notification stream";
+ else if (SOUND_STREAM_TYPE_ALARM == stream_type)
+ return "Alarm stream";
+ else if (SOUND_STREAM_TYPE_VOICE_INFORMATION == stream_type)
+ return "Voice information stream";
+
+ return "Non matched stream";
+}
+
+static sound_stream_ducking_h __create_ducking_handle(sound_stream_type_e type)
+{
+ sound_stream_ducking_h ducking_handle = nullptr;
+
+ int ret = sound_manager_create_stream_ducking(type, nullptr, nullptr, &ducking_handle);
+ if (SOUND_MANAGER_ERROR_NONE != ret) {
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to create stream ducking. type(%d) ret(%d/%s)", type, ret, get_error_message(ret));
+ return nullptr;
+ }
+
+ SLOG(LOG_INFO, TAG_VCM, "Create ducking handle. type(%d) handle(%p)", type, ducking_handle);
+ return ducking_handle;
+}
+
+static void __destroy_ducking_handle(sound_stream_ducking_h ducking_handle)
+{
+ if (nullptr == ducking_handle) {
+ return;
+ }
+
+ int ret = sound_manager_destroy_stream_ducking(ducking_handle);
+ SLOG(LOG_WARN, TAG_VCM, "Destroy ducking handle. handle(%p) ret(%d/%s)", ducking_handle, ret, get_error_message(ret));
+}
+
+static bool __is_all_ducking_handle_valid()
+{
+ if (nullptr == g_media_stream_h || nullptr == g_system_stream_h || nullptr == g_notification_stream_h ||
+ nullptr == g_alarm_stream_h || nullptr == g_voice_information_stream_h) {
+ return false;
+ }
+
+ return true;
+}
+
+static void __destroy_all_ducking_handle()
+{
+ __destroy_ducking_handle(g_media_stream_h);
+ __destroy_ducking_handle(g_system_stream_h);
+ __destroy_ducking_handle(g_notification_stream_h);
+ __destroy_ducking_handle(g_alarm_stream_h);
+ __destroy_ducking_handle(g_voice_information_stream_h);
+
+ g_media_stream_h = nullptr;
+ g_system_stream_h = nullptr;
+ g_notification_stream_h = nullptr;
+ g_alarm_stream_h = nullptr;
+ g_voice_information_stream_h = nullptr;
+}
+
+int vc_mgr_ducking_create(void)
+{
+ if (g_is_created) {
+ SLOG(LOG_INFO, TAG_VCM, "All ducking handle is already created");
+ return VC_ERROR_NONE;
+ }
+
+ g_media_stream_h = __create_ducking_handle(SOUND_STREAM_TYPE_MEDIA);
+ g_system_stream_h = __create_ducking_handle(SOUND_STREAM_TYPE_SYSTEM);
+ g_notification_stream_h = __create_ducking_handle(SOUND_STREAM_TYPE_NOTIFICATION);
+ g_alarm_stream_h = __create_ducking_handle(SOUND_STREAM_TYPE_ALARM);
+ g_voice_information_stream_h = __create_ducking_handle(SOUND_STREAM_TYPE_VOICE_INFORMATION);
+
+ if (false == __is_all_ducking_handle_valid()) {
+ __destroy_all_ducking_handle();
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to create ducking handles");
+ return VC_ERROR_OPERATION_FAILED;
+ }
+
+ g_is_created = true;
+ return VC_ERROR_NONE;
+}
+
+int vc_mgr_ducking_destroy(void)
+{
+ __destroy_all_ducking_handle();
+
+ g_is_created = false;
+ return VC_ERROR_NONE;
+}
+
+static int __activate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header, double ratio)
+{
+ bool is_ducked = false;
+ int ret = SOUND_MANAGER_ERROR_NONE;
+ ret = sound_manager_is_ducked(header, &is_ducked);
+ if (is_ducked) {
+ SLOG(LOG_DEBUG, TAG_VCM, "The %s is already ducked", __get_ducking_stream(type));
+ return ret;
+ }
+
+ ret = sound_manager_activate_ducking(header, SND_MGR_DUCKING_DURATION, ratio);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to activate ducking for %s", __get_ducking_stream(type));
+ else
+ SLOG(LOG_INFO, TAG_VCM, "Activate ducking for %s", __get_ducking_stream(type));
+
+ return ret;
+}
+
+int vc_mgr_ducking_activate(double ratio)
+{
+ SLOG(LOG_INFO, TAG_VCM, "vc_mgr_ducking_activate ratio(%lf)", ratio);
+
+ int ret = VC_ERROR_NONE;
+ ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_MEDIA, g_media_stream_h, ratio);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_SYSTEM, g_system_stream_h, ratio);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_NOTIFICATION, g_notification_stream_h, ratio);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_ALARM, g_alarm_stream_h, ratio);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __activate_ducking_sound_stream(SOUND_STREAM_TYPE_VOICE_INFORMATION, g_voice_information_stream_h, ratio);
+ return ret;
+}
+
+static int __deactivate_ducking_sound_stream(sound_stream_type_e type, sound_stream_ducking_h header)
+{
+ bool is_ducked = false;
+ int ret = SOUND_MANAGER_ERROR_NONE;
+ ret = sound_manager_is_ducked(header, &is_ducked);
+ if (false == is_ducked) {
+ SLOG(LOG_DEBUG, TAG_VCM, "The %s is already recovered from ducking", __get_ducking_stream(type));
+ return ret;
+ }
+
+ ret = sound_manager_deactivate_ducking(header);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Fail to deactivate ducking for %s", __get_ducking_stream(type));
+ else
+ SLOG(LOG_INFO, TAG_VCM, "Deactivate ducking for %s", __get_ducking_stream(type));
+
+ return ret;
+}
+
+int vc_mgr_ducking_deactivate(void)
+{
+ SLOG(LOG_INFO, TAG_VCM, "vc_mgr_ducking_deactivate");
+
+ int ret = VC_ERROR_NONE;
+ ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_MEDIA, g_media_stream_h);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_SYSTEM, g_system_stream_h);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_NOTIFICATION, g_notification_stream_h);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_ALARM, g_alarm_stream_h);
+ if (SOUND_MANAGER_ERROR_NONE != ret)
+ return ret;
+
+ ret = __deactivate_ducking_sound_stream(SOUND_STREAM_TYPE_VOICE_INFORMATION, g_voice_information_stream_h);
+ return ret;
+}
+/*
+* Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
#ifndef __VC_MGR_DUCKING_H__
#define __VC_MGR_DUCKING_H__
#define VC_ENGINE_APPID_LEN 256
#define VC_TIDL_RETRY_COUNT 100
+#define VC_MGR_DEFAULT_FARFIELD_DUCKING_RATIO 0.0
+#define VC_MGR_DEFAULT_NEARFIELD_DUCKING_RATIO 0.7
+#define VC_MGR_MINIMUM_DUCKING_RATIO 0.0
+#define VC_MGR_MAXIMUM_DUCKING_RATIO 1.0
+
+
#define VC_FEATURE_PATH "tizen.org/feature/speech.control"
#define VC_MGR_FEATURE_PATH "tizen.org/feature/speech.control_manager"
#define VC_MIC_FEATURE_PATH "tizen.org/feature/microphone"