summaryrefslogtreecommitdiff
path: root/src/lib/epulse.c
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-03-24 14:39:17 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-04-03 16:23:19 -0300
commit4ac33e16ddb3efe95edffab6c67c7bbbd9ffe452 (patch)
treeba39d07e326be9dc5bd8c7e172adcde24f929f38 /src/lib/epulse.c
parent196cdb70b84958dd827797f86e78abd798e48cf7 (diff)
[epulse] Fixing the sink port changing
Diffstat (limited to '')
-rw-r--r--src/lib/epulse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/epulse.c b/src/lib/epulse.c
index f0e3af9..665d9d8 100644
--- a/src/lib/epulse.c
+++ b/src/lib/epulse.c
@@ -62,6 +62,7 @@ _event_sink_free_cb(void *user_data EINA_UNUSED, void *func_data)
62 EINA_LIST_FREE(ev->ports, port) 62 EINA_LIST_FREE(ev->ports, port)
63 { 63 {
64 free(port->name); 64 free(port->name);
65 free(port->description);
65 free(port); 66 free(port);
66 } 67 }
67 68
@@ -104,8 +105,8 @@ _sink_cb(pa_context *c EINA_UNUSED, const pa_sink_info *info, int eol,
104 105
105 port->available = !!info->ports[i]->available; 106 port->available = !!info->ports[i]->available;
106 port->priority = info->ports[i]->priority; 107 port->priority = info->ports[i]->priority;
107 port->name = strdup(info->ports[i]->description ?: 108 port->name = strdup(info->ports[i]->name);
108 info->ports[i]->name); 109 port->description = strdup(info->ports[i]->description);
109 ev->ports = eina_list_append(ev->ports, port); 110 ev->ports = eina_list_append(ev->ports, port);
110 if (info->ports[i]->name == info->active_port->name) 111 if (info->ports[i]->name == info->active_port->name)
111 port->active = EINA_TRUE; 112 port->active = EINA_TRUE;
@@ -769,9 +770,9 @@ epulse_sink_port_set(int index, const char *port)
769 pa_operation* o; 770 pa_operation* o;
770 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE); 771 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE);
771 772
772 if (!(o = pa_context_set_source_port_by_index(ctx->context, 773 if (!(o = pa_context_set_sink_port_by_index(ctx->context,
773 index, port, NULL, 774 index, port, NULL,
774 NULL))) 775 NULL)))
775 { 776 {
776 ERR("pa_context_set_source_port_by_index() failed"); 777 ERR("pa_context_set_source_port_by_index() failed");
777 return EINA_FALSE; 778 return EINA_FALSE;