SM_INSTANCE_CHECK(ducking);
- ret = _get_ducking_state(ducking->pa_info.index, &is_ducked);
- if (ret != MM_ERROR_NONE)
- return _convert_sound_manager_error_code(__func__, ret);
+ if (ducking->pa_info.is_disconnected == false) {
+ ret = _get_ducking_state(ducking->pa_info.index, &is_ducked);
+ if (ret != MM_ERROR_NONE)
+ return _convert_sound_manager_error_code(__func__, ret);
+ } else {
+ LOGW("disconnected handle. destroy it.");
+ }
SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&ducking_mutex, SOUND_MANAGER_ERROR_INTERNAL);
assert(c);
state = pa_context_get_state(c);
+
LOGI("[%p] context state = [%d]", pa_info, state);
+
+ if (state == PA_CONTEXT_FAILED) {
+ pa_info->is_disconnected = true;
+ LOGE("PA DISCONNECTED");
+ }
+
switch (state) {
case PA_CONTEXT_READY:
case PA_CONTEXT_TERMINATED: