/* Called from main context */
static void update_adjust_timer(struct userdata *u) {
+#ifdef __TIZEN__
+ if ((u->sink_input && u->sink_input->state == PA_SINK_INPUT_CORKED) ||
+ (u->source_output && u->source_output->state == PA_SOURCE_OUTPUT_CORKED))
+#else
if (u->sink_input->state == PA_SINK_INPUT_CORKED || u->source_output->state == PA_SOURCE_OUTPUT_CORKED)
+#endif
enable_adjust_timer(u, false);
else
enable_adjust_timer(u, true);
pa_assert_ctl_context();
pa_assert_se(u = o->userdata);
+#ifdef __TIZEN__
+ if (!u->sink_input) {
+ pa_log_warn("sink_input is already null now, do nothing");
+ return;
+ }
+#endif
+
input_description = pa_sprintf_malloc("Loopback of %s",
pa_strnull(pa_proplist_gets(dest->proplist, PA_PROP_DEVICE_DESCRIPTION)));
pa_sink_input_set_property(u->sink_input, PA_PROP_MEDIA_NAME, input_description);
/* If the source has been suspended, we need to handle this like
* a source change when the source is resumed */
if (suspended) {
+#ifdef __TIZEN__
+ if (u->sink_input && u->sink_input->sink)
+#else
if (u->sink_input->sink)
+#endif
pa_asyncmsgq_send(u->sink_input->sink->asyncmsgq, PA_MSGOBJECT(u->sink_input), SINK_INPUT_MESSAGE_SOURCE_CHANGED, NULL, 0, NULL);
else
u->output_thread_info.push_called = false;
} else
/* Get effective source latency on unsuspend */
+#ifdef __TIZEN__
+ if (u->sink_input)
+#endif
update_effective_source_latency(u, u->source_output->source, u->sink_input->sink);
+#ifdef __TIZEN__
+ if (u->sink_input)
+#endif
pa_sink_input_cork(u->sink_input, suspended);
update_adjust_timer(u);
pa_assert_ctl_context();
pa_assert_se(u = i->userdata);
+#ifdef __TIZEN__
+ if (!u->source_output) {
+ pa_log_warn("source_output is already null now, do nothing");
+ return;
+ }
+#endif
+
output_description = pa_sprintf_malloc("Loopback to %s",
pa_strnull(pa_proplist_gets(dest->proplist, PA_PROP_DEVICE_DESCRIPTION)));
pa_source_output_set_property(u->source_output, PA_PROP_MEDIA_NAME, output_description);
} else
/* Set effective source latency on unsuspend */
+#ifdef __TIZEN__
+ if (u->source_output)
+#endif
update_effective_source_latency(u, u->source_output->source, u->sink_input->sink);
+#ifdef __TIZEN__
+ if (u->source_output)
+#endif
pa_source_output_cork(u->source_output, suspended);
update_adjust_timer(u);