From e2827b35575bab20a99a170805a0a59a32fb2c48 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 28 Aug 2007 09:54:21 +0000 Subject: Make SBC Audio Source count configurable and the default value 1 --- audio/a2dp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'audio/a2dp.c') diff --git a/audio/a2dp.c b/audio/a2dp.c index d3cedefc..fad9bd25 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -656,21 +656,21 @@ add: return sep; } -int a2dp_init(DBusConnection *conn, gboolean enable_sink, gboolean enable_source) +int a2dp_init(DBusConnection *conn, int sources, int sinks) { - if (!enable_sink && !enable_source) + int i; + + if (!sources && !sinks) return 0; connection = dbus_connection_ref(conn); avdtp_init(); - if (enable_sink) { - a2dp_add_sep(conn, AVDTP_SEP_TYPE_SOURCE); + for (i = 0; i < sources; i++) a2dp_add_sep(conn, AVDTP_SEP_TYPE_SOURCE); - } - if (enable_source) + for (i = 0; i < sinks; i++) a2dp_add_sep(conn, AVDTP_SEP_TYPE_SINK); return 0; -- cgit