bluetooth-client: strip 'siri' from the samples forwarded to BT device
authorJanos Kovacs <jankovac503@gmail.com>
Thu, 6 Jun 2013 13:43:07 +0000 (16:43 +0300)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 6 Jun 2013 13:57:03 +0000 (16:57 +0300)
src/plugins/bluetooth-client/clients.c

index f012ee1..1f9789e 100644 (file)
@@ -292,6 +292,7 @@ static int notify_command(srs_client_t *srs_client, int idx,
     clients_t *clients;
     device_t *device;
     char cmd[2048];
+    uint32_t from;
     char *e, *p, *sep;
     int i;
 
@@ -312,7 +313,9 @@ static int notify_command(srs_client_t *srs_client, int idx,
 
     mrp_log_info("Bluetooth client got command '%s'\n", cmd);
 
-    if (play_samples(ctx, 0, audio->samples, audio) < 0)
+    from = strcmp(tokens[0], "siri") ? 0 : end[0];
+
+    if (play_samples(ctx, from, audio->samples, audio) < 0)
         return FALSE;
 
     return TRUE;