diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 09:54:21 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-28 09:54:21 +0000 |
commit | e2827b35575bab20a99a170805a0a59a32fb2c48 (patch) | |
tree | edb190807b7b969177647edd311e83187cedf5bb /audio/main.c | |
parent | b72f1302fa22e420431356a61a80f5f045f75c97 (diff) |
Make SBC Audio Source count configurable and the default value 1
Diffstat (limited to 'audio/main.c')
-rw-r--r-- | audio/main.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/audio/main.c b/audio/main.c index ae43f170..8e27190c 100644 --- a/audio/main.c +++ b/audio/main.c @@ -43,6 +43,7 @@ static gboolean disable_hfp = TRUE; static gboolean sco_hci = FALSE; +static int source_count = 1; static GMainLoop *main_loop = NULL; @@ -123,9 +124,20 @@ static void read_config(const char *file) } else disable_hfp = no_hfp; - debug("Config options: DisableHFP=%s, SCORouting=%s", + str = g_key_file_get_string(keyfile, "A2DP", + "SourceCount", &err); + if (err) { + debug("%s: %s", file, err->message); + g_error_free(err); + err = NULL; + } else { + source_count = atoi(str); + g_free(str); + } + + debug("Config options: DisableHFP=%s, SCORouting=%s, SourceCount=%d", disable_hfp ? "true" : "false", - sco_hci ? "HCI" : "PCM"); + sco_hci ? "HCI" : "PCM", source_count); g_key_file_free(keyfile); } @@ -164,7 +176,8 @@ int main(int argc, char *argv[]) exit(1); } - if (audio_init(conn, &enabled, disable_hfp, sco_hci) < 0) { + if (audio_init(conn, &enabled, disable_hfp, sco_hci, + source_count) < 0) { error("Audio init failed!"); exit(1); } |