~cjcurran/+junk/soundnua-gtk-warnings

« back to all changes in this revision

Viewing changes to soundnua/gvc-mixer-control.c

  • Committer: Conor Curran
  • Date: 2012-04-10 20:14:04 UTC
  • Revision ID: conor.curran@canonical.com-20120410201404-9waj7u3ar8ki3bk2
replace all prints with g_debugs

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
        ports = gvc_mixer_stream_get_ports (stream);
206
206
 
207
207
        is_network_stream = ports == NULL;
208
 
        //g_print ("\n is_network or bluetooth stream = %i \n", is_network_stream);
 
208
        //g_debug ("\n is_network or bluetooth stream = %i \n", is_network_stream);
209
209
 
210
210
        for (d = devices; d != NULL; d = d->next) {             
211
211
                device = d->data;
217
217
 
218
218
                if (is_network_stream) {
219
219
                        if (stream_id == gvc_mixer_stream_get_id (stream)) {
220
 
                                g_print ("\n lookup device from stream - %s - it is a network_stream \n",
 
220
                                g_debug ("\n lookup device from stream - %s - it is a network_stream \n",
221
221
                                        gvc_mixer_ui_device_get_description (device));
222
222
                                return device;
223
223
                        }       
226
226
                        const GvcMixerStreamPort *port;
227
227
                        port = gvc_mixer_stream_get_port (stream);
228
228
 
229
 
                        //g_print ("\n \n lookup device from stream - get port from stream %s", gvc_mixer_stream_get_description (stream));
 
229
                        //g_debug ("\n \n lookup device from stream - get port from stream %s", gvc_mixer_stream_get_description (stream));
230
230
 
231
231
                        if (stream_id == gvc_mixer_stream_get_id (stream) &&
232
232
                            g_strcmp0 (gvc_mixer_ui_device_get_port(device),
233
233
                                       port->port) == 0) {
234
 
                                g_print ("\n \n lookup-device-from-stream found device  \n device description %s \n device port = %s \n device stream id %i \n AND \n stream port = %s stream id %u and stream description %s \n",
 
234
                                g_debug ("\n \n lookup-device-from-stream found device  \n device description %s \n device port = %s \n device stream id %i \n AND \n stream port = %s stream id %u and stream description %s \n",
235
235
                                         gvc_mixer_ui_device_get_description (device),
236
236
                                         gvc_mixer_ui_device_get_port(device),                                 
237
237
                                         stream_id,
242
242
                        }
243
243
                }
244
244
        }
245
 
        g_print ("\n gvc_mixer_control_lookup_device_from_stream - Could not find a device ?  %s \n", gvc_mixer_stream_get_description (stream));                
 
245
        g_debug ("\n gvc_mixer_control_lookup_device_from_stream - Could not find a device ?  %s \n", gvc_mixer_stream_get_description (stream));                
246
246
        return NULL;
247
247
}
248
248
 
255
255
        g_return_val_if_fail (GVC_IS_MIXER_CONTROL (control), FALSE);
256
256
        g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), FALSE);
257
257
 
258
 
        g_print ("\n about to set default sink on server \n");
 
258
        g_debug ("\n about to set default sink on server \n");
259
259
        o = pa_context_set_default_sink (control->priv->pa_context,
260
260
                                         gvc_mixer_stream_get_name (stream),
261
261
                                         NULL,
489
489
        }
490
490
        GvcMixerCard *card;
491
491
        card = gvc_mixer_control_lookup_card_id (control, card_id);     
492
 
        g_print ("\n Trying to move to profile %s on card %s on stream id %i \n",
 
492
        g_debug ("\n Trying to move to profile %s on card %s on stream id %i \n",
493
493
                profile,
494
494
                gvc_mixer_card_get_name (card),
495
495
                gvc_mixer_ui_device_get_stream_id (device));
496
496
 
497
497
        
498
 
        g_print ("\n default sink name = %s \n and default sink id %u",
 
498
        g_debug ("\n default sink name = %s \n and default sink id %u",
499
499
                 control->priv->default_sink_name,
500
500
                 control->priv->default_sink_id);
501
501
 
519
519
gvc_mixer_control_change_output (GvcMixerControl *control,
520
520
                                 GvcMixerUIDevice* output)
521
521
{
522
 
        g_print ("\n control change output \n");
 
522
        g_debug ("\n control change output \n");
523
523
        GvcMixerStream *stream;
524
524
        GvcMixerStream *default_stream;
525
525
 
541
541
                        profile_name = gvc_mixer_ui_device_get_top_priority_profile (output);
542
542
                }
543
543
 
544
 
                g_print ("\n Trying to move to profile %s \n", profile_name);
 
544
                g_debug ("\n Trying to move to profile %s \n", profile_name);
545
545
                GvcMixerCard *card;
546
546
                card = gvc_mixer_control_lookup_card_id (control, card_id);
547
547
                
553
553
 
554
554
        // Handle a network sink => a portless or cardless device
555
555
        if (gvc_mixer_ui_device_is_software (output) || gvc_mixer_ui_device_is_bluetooth (output)){
556
 
                g_print ("Did we try to move to a software/bluetooth sink ? \n");
 
556
                g_debug ("Did we try to move to a software/bluetooth sink ? \n");
557
557
                if (gvc_mixer_control_set_default_sink (control, stream)) {
558
558
                        // sink change successfull => update the UI.
559
559
                        g_signal_emit (G_OBJECT (control),
572
572
        const gchar* output_port = gvc_mixer_ui_device_get_port (output);
573
573
        // First ensure the correct port is active on the sink
574
574
        if (g_strcmp0 (active_port->port, output_port) != 0){
575
 
                g_print ("\n Port change, switch to = %s \n", 
 
575
                g_debug ("\n Port change, switch to = %s \n", 
576
576
                          output_port); 
577
577
                if (gvc_mixer_stream_change_port (stream, output_port) == FALSE){
578
578
                        g_warning ("\n Could not change port ! \n");
584
584
        
585
585
        // Finally if we are not on the correct stream, swap over.
586
586
        if (stream != default_stream){
587
 
                g_print ("\n\n !!!!Attempting to swap over to stream %s \n",
 
587
                g_debug ("\n\n !!!!Attempting to swap over to stream %s \n",
588
588
                         gvc_mixer_stream_get_description(stream));
 
589
                GvcMixerUIDevice* output;
589
590
                if (gvc_mixer_control_set_default_sink (control, stream)){
590
 
                        GvcMixerUIDevice* output;
591
591
                        output = gvc_mixer_control_lookup_device_from_stream (control, stream);
592
592
                        g_signal_emit (G_OBJECT (control),
593
593
                                       signals[ACTIVE_OUTPUT_UPDATE],
594
594
                                       0,
595
595
                                       gvc_mixer_ui_device_get_id (output));                                  
596
596
                }
 
597
                else{
 
598
                        // If the move failed for some reason reset the UI.
 
599
                        output = gvc_mixer_control_lookup_device_from_stream (control, default_stream);
 
600
                        g_signal_emit (G_OBJECT (control),
 
601
                                       signals[ACTIVE_OUTPUT_UPDATE],
 
602
                                       0,
 
603
                                       gvc_mixer_ui_device_get_id (output));                                  
 
604
                        
 
605
                }
597
606
        }
598
607
}
599
608
 
629
638
                        profile_name = gvc_mixer_ui_device_get_top_priority_profile (input);
630
639
                }
631
640
 
632
 
                g_print ("\n trying to move to profile %s \n", profile_name);
 
641
                g_debug ("\n trying to move to profile %s \n", profile_name);
633
642
                GvcMixerCard *card;
634
643
                card = gvc_mixer_control_lookup_card_id (control, card_id);
635
644
                
641
650
 
642
651
        // Handle a network sink => a portless/cardless device
643
652
        if (gvc_mixer_ui_device_is_software (input) || gvc_mixer_ui_device_is_bluetooth (input)){
644
 
                g_print ("\n Did we try to move to a software/bluetooth source ? \n");
 
653
                g_debug ("\n Did we try to move to a software/bluetooth source ? \n");
645
654
                if (gvc_mixer_control_set_default_source (control, stream)) {
646
655
                        g_signal_emit (G_OBJECT (control),
647
656
                                       signals[ACTIVE_INPUT_UPDATE],
659
668
        const gchar* input_port = gvc_mixer_ui_device_get_port (input);
660
669
        // First ensure the correct port is active on the sink
661
670
        if (g_strcmp0 (active_port->port, input_port) != 0){
662
 
                g_print ("\n Port change, switch to = %s \n", 
 
671
                g_debug ("\n Port change, switch to = %s \n", 
663
672
                          input_port); 
664
673
                if (gvc_mixer_stream_change_port (stream, input_port) == FALSE){
665
674
                        g_warning ("\n Could not change port ! \n");
671
680
        
672
681
        // Finally if we are not on the correct stream, swap over.              
673
682
        if (stream != default_stream){
674
 
                g_print ("\n change-input - attempting to swap over to stream %s \n",
 
683
                g_debug ("\n change-input - attempting to swap over to stream %s \n",
675
684
                         gvc_mixer_stream_get_description(stream));
676
685
                gvc_mixer_control_set_default_source (control, stream);
677
686
        }
893
902
        input = gvc_mixer_control_lookup_device_from_stream (control,
894
903
                                                             gvc_mixer_control_get_default_source (control));
895
904
                                                                      
896
 
        g_print ("\n\n on_default_source_port_notify - moved to port %s \n which SHOULD ?? correspond to output \n %s \n",
 
905
        g_debug ("\n\n on_default_source_port_notify - moved to port %s \n which SHOULD ?? correspond to output \n %s \n",
897
906
                 port,
898
907
                 gvc_mixer_ui_device_get_description (input));
899
908
        g_signal_emit (G_OBJECT (control),
964
973
        output = gvc_mixer_control_lookup_device_from_stream (control,
965
974
                                                              gvc_mixer_control_get_default_sink (control));
966
975
                                                                      
967
 
        g_print ("\n\n on_default_sink_port_notify - moved to port %s \n which SHOULD correspond to output %s \n",
 
976
        g_debug ("\n\n on_default_sink_port_notify - moved to port %s \n which SHOULD correspond to output %s \n",
968
977
                 port,
969
978
                 gvc_mixer_ui_device_get_description (output));
970
979
        g_signal_emit (G_OBJECT (control),
1021
1030
                GvcMixerUIDevice* output;                
1022
1031
                output = gvc_mixer_control_lookup_device_from_stream (control, stream);
1023
1032
 
1024
 
                g_print ("active_sink change \n");
 
1033
                g_debug ("active_sink change \n");
1025
1034
 
1026
1035
                g_signal_emit (G_OBJECT (control),
1027
1036
                               signals[ACTIVE_OUTPUT_UPDATE],
1117
1126
                update_default_source_from_name (control, info->default_source_name);
1118
1127
        }
1119
1128
        if (info->default_sink_name != NULL) {
1120
 
                g_print ("\n update server");
 
1129
                g_debug ("\n update server");
1121
1130
                update_default_sink_from_name (control, info->default_sink_name);
1122
1131
        }
1123
1132
}
1200
1209
                             "port-name", &device_port_name,
1201
1210
                              NULL);
1202
1211
 
1203
 
                /*g_print ("\n Attempt to match_stream update_with_existing_outputs \n Try description : %s \n, origin : %s \n device port name : %s \n card id : %i \n AGAINST stream port: %s \n sink card id %i \n\n ",
 
1212
                /*g_debug ("\n Attempt to match_stream update_with_existing_outputs \n Try description : %s \n, origin : %s \n device port name : %s \n card id : %i \n AGAINST stream port: %s \n sink card id %i \n\n ",
1204
1213
                         description,
1205
1214
                         origin,
1206
1215
                         device_port_name,
1210
1219
 
1211
1220
                if ( stream_card_id == card_id &&
1212
1221
                     g_strcmp0 (device_port_name, stream_port->port) == 0) {                                         
1213
 
                        g_print ("\n Match device with stream \n We have a match with description : %s  \n origin : %s \n cached already with device id %u, \n => set stream id to %i \n\n ",
 
1222
                        g_debug ("\n Match device with stream \n We have a match with description : %s  \n origin : %s \n cached already with device id %u, \n => set stream id to %i \n\n ",
1214
1223
                                 description,
1215
1224
                                 origin,
1216
1225
                                 gvc_mixer_ui_device_get_id (device),
1244
1253
        stream_ports = gvc_mixer_stream_get_ports (stream);
1245
1254
        gint stream_port_count = 0;
1246
1255
                
1247
 
        if (g_list_length (stream_ports) == 0){                       
 
1256
        if (g_list_length (stream_ports) == 0){
1248
1257
                GvcMixerUIDevice* device;
1249
1258
 
1250
1259
                if (gvc_mixer_stream_get_card_index (stream) != PA_INVALID_INDEX) {
1251
 
                        g_print ("\n \n Bluetooth device \n \n");
1252
1260
                        GList *devices;
1253
 
                        gint  card_id;
1254
1261
 
1255
1262
                        if (GVC_IS_MIXER_SOURCE (stream)){
1256
1263
                               devices  = g_hash_table_get_values (control->priv->ui_inputs);                       
1262
1269
                        gboolean in_possession  = FALSE;
1263
1270
 
1264
1271
                        for (d = devices; d != NULL; d = d->next) {                             
 
1272
                                gint  card_id;
1265
1273
                                device = d->data;
1266
1274
                                
1267
1275
                                g_object_get (G_OBJECT (device),
1268
1276
                                             "card-id", &card_id,
1269
1277
                                              NULL);
 
1278
                                g_debug ("\n sync devices \n device description - %s \n device card id - %i \n stream description - %s \n stream card id - %i", gvc_mixer_ui_device_get_description (device), card_id, gvc_mixer_stream_get_description (stream), gvc_mixer_stream_get_card_index (stream));
1270
1279
                                if (card_id == gvc_mixer_stream_get_card_index (stream)){
1271
1280
                                        in_possession = TRUE;
1272
1281
                                        break;
1273
1282
                                }
1274
1283
                        }
1275
1284
                        if (!in_possession){
1276
 
                                g_warning ("\n \n Couldn't match the bluetooth stream \n \n");
 
1285
                                g_warning ("\n \n Couldn't match the portless stream (with card) - %s \n is it an input ? -> %i \n \n streams card id -> %i \n", gvc_mixer_stream_get_description (stream), GVC_IS_MIXER_SOURCE (stream), gvc_mixer_stream_get_card_index (stream));
1277
1286
                                return;
1278
1287
                        }
1279
1288
 
1284
1293
                                      "stream-id", (gint)gvc_mixer_stream_get_id (stream),
1285
1294
                                      "description", gvc_mixer_stream_get_description (stream),
1286
1295
                                      "origin", "", /*Leave it empty for these special cases*/
1287
 
                                       "port-name", NULL,
1288
 
                                       "port-available", TRUE,
1289
 
                                       NULL);
 
1296
                                      "port-name", NULL,
 
1297
                                      "port-available", TRUE,
 
1298
                                      NULL);
1290
1299
                }
1291
1300
                else{
1292
 
                        g_print ("\n \n software device \n");
1293
1301
                        GObject *object;
1294
1302
 
1295
1303
                        object = g_object_new (GVC_TYPE_MIXER_UI_DEVICE,
1298
1306
                                               "origin", "", /*Leave it empty for these special cases*/
1299
1307
                                               "port-name", NULL,
1300
1308
                                               "port-available", TRUE,
1301
 
                                               NULL);
 
1309
                                                NULL);
1302
1310
                        device = GVC_MIXER_UI_DEVICE (object);
1303
1311
 
1304
1312
                        g_hash_table_insert (is_output ? control->priv->ui_outputs : control->priv->ui_inputs,
1327
1335
                        continue;               
1328
1336
                
1329
1337
                g_warning ("\n\n\n\n\n !!!!!!!!!!!!!!!!! why am I here  !!! \n\n");
1330
 
                g_print ("\n Failed to match \n stream id: %u \n description : %s \n origin : %s \n \n ",
 
1338
                g_debug ("\n Failed to match \n stream id: %u \n description : %s \n origin : %s \n \n ",
1331
1339
                                 gvc_mixer_stream_get_id (stream),
1332
1340
                                 stream_port->human_port,                                        
1333
1341
                                 gvc_mixer_stream_get_description (stream));            
1464
1472
                        active_port = gvc_mixer_stream_get_port (stream);
1465
1473
                        if (active_port == NULL || 
1466
1474
                            g_strcmp0 (active_port->port, info->active_port->name) != 0){                
1467
 
                                g_print ("\n update sink - apparently a port update");
 
1475
                                g_debug ("\n update sink - apparently a port update");
1468
1476
                                gvc_mixer_stream_set_port (stream, info->active_port->name);
1469
1477
                        }
1470
1478
                }
1471
1479
        }
1472
1480
        
1473
1481
        if (is_new) {
1474
 
                g_print ("\n update sink - is new \n");
 
1482
                g_debug ("\n update sink - is new \n");
1475
1483
 
1476
1484
                g_hash_table_insert (control->priv->sinks,
1477
1485
                                     GUINT_TO_POINTER (info->index),
1494
1502
                                                             control->priv->cached_desired_output_id);
1495
1503
                if (gvc_mixer_stream_get_ports (stream) != NULL && output != NULL){
1496
1504
                        
1497
 
                        g_print ("\n Apparently we have a cached desired output, \n we should be on port %s \n",
 
1505
                        g_debug ("\n Apparently we have a cached desired output, \n we should be on port %s \n",
1498
1506
                                  gvc_mixer_ui_device_get_port (output)); 
1499
1507
                        GvcMixerStreamPort* active_port = gvc_mixer_stream_get_port (stream);
1500
1508
                        
1501
1509
                        if (g_strcmp0(active_port->port, gvc_mixer_ui_device_get_port (output)) == 0){
1502
 
                                g_print ("\n no need to change port, its already active \n");                       
 
1510
                                g_debug ("\n no need to change port, its already active \n");                       
1503
1511
                        }
1504
1512
                        else{                                                                              
1505
1513
                                if (gvc_mixer_stream_change_port (stream, gvc_mixer_ui_device_get_port (output)) == FALSE){
1506
1514
                                        g_warning ("\n Tried to swap port to previously cache port but failed");
1507
1515
                                }
1508
1516
                                else{
1509
 
                                        g_print ("\n Swap port to previously cached port %s - return \n",
 
1517
                                        g_debug ("\n Swap port to previously cached port %s - return \n",
1510
1518
                                                 gvc_mixer_ui_device_get_port (output)); 
1511
1519
                                        control->priv->cached_desired_output_id = GVC_MIXER_UI_DEVICE_INVALID;
1512
1520
                                        return;               
1531
1539
                if (dev != NULL){
1532
1540
                        // now check to make sure this new stream is the same stream just matched and set on the device object
1533
1541
                        if (gvc_mixer_ui_device_get_stream_id (dev) == gvc_mixer_stream_get_id (stream)){
1534
 
                                g_print ("Looks like we profile swapped on a non server default sink");
 
1542
                                g_debug ("Looks like we profile swapped on a non server default sink");
1535
1543
                                gvc_mixer_control_set_default_sink (control, stream);
1536
1544
                                default_set = TRUE;                   
1537
1545
                        }  
1626
1634
                        active_port = gvc_mixer_stream_get_port (stream);
1627
1635
                        if (active_port == NULL || 
1628
1636
                            g_strcmp0 (active_port->port, info->active_port->name) != 0){                
1629
 
                                g_print ("\n update source - apparently a port update \n");
 
1637
                                g_debug ("\n update source - apparently a port update \n");
1630
1638
                                gvc_mixer_stream_set_port (stream, info->active_port->name);
1631
1639
                        }
1632
1640
                }
1651
1659
/*        if (port_change) {
1652
1660
                GvcMixerUIDevice* input;
1653
1661
                input = gvc_mixer_control_lookup_device_from_stream (control, stream);
1654
 
                g_print ("port change detected in the update source 2\n");
 
1662
                g_debug ("port change detected in the update source 2\n");
1655
1663
                g_signal_emit (G_OBJECT (control),
1656
1664
                               signals[ACTIVE_INPUT_UPDATE],
1657
1665
                               0,
1865
1873
                        }
1866
1874
                }
1867
1875
        }
1868
 
        g_print ("\n %i profiles supported on port %s \n",
 
1876
        g_debug ("\n %i profiles supported on port %s \n",
1869
1877
                 g_list_length (supported_profiles),
1870
1878
                 port->description);
1871
1879
        return g_list_sort (supported_profiles, (GCompareFunc) sort_profiles);
1927
1935
                }                                            
1928
1936
        }
1929
1937
 
1930
 
        g_print ("\n create_ui_device_from_port, direction %u \n description %s \n origin %s \n port available %i \n \n", 
 
1938
        g_debug ("\n create_ui_device_from_port, direction %u \n description %s \n origin %s \n port available %i \n \n", 
1931
1939
                 direction,
1932
1940
                 port->human_port,
1933
1941
                 gvc_mixer_card_get_name (card),
1965
1973
 
1966
1974
                if (g_strcmp0 (card_port->port, device_port_name) == 0 && 
1967
1975
                        card_id == gvc_mixer_card_get_index (card)) { 
1968
 
                        g_print ("\n Found the relevant device %s \n update it's port availability flag to %i \n is_output %i",
 
1976
                        g_debug ("\n Found the relevant device %s \n update it's port availability flag to %i \n is_output %i",
1969
1977
                                 device_port_name,
1970
1978
                                 available,
1971
1979
                                 is_output);
2015
2023
        const char *key;
2016
2024
        void *state;
2017
2025
 
2018
 
        /*g_print ("Udpating card %s (index: %u driver: %s):",
 
2026
        /*g_debug ("Udpating card %s (index: %u driver: %s):",
2019
2027
                 info->name, info->index, info->driver);*/
2020
2028
 
2021
2029
        for (i = 0; i < info->n_profiles; i++) {
2091
2099
        
2092
2100
        guint port_count;
2093
2101
        port_count = g_list_length (card_ports);
 
2102
        g_debug ("\n update card- %s \n", gvc_mixer_card_get_name (card));
2094
2103
 
2095
2104
        if (port_count == 0 && is_new){
2096
2105
                // TODO : move to its own method.
2097
 
                g_print ("\n Bluetooth card just registered \n");
 
2106
                g_debug ("\n Portless card just registered - %s \n", gvc_mixer_card_get_name (card));
2098
2107
                // For now just create two devices and presume this device is multi directional
2099
2108
                // Ensure to remove both on card removal (available to false by default)
2100
2109
                const GList *profiles = NULL;
2101
2110
                profiles = gvc_mixer_card_get_profiles (card);
2102
2111
 
 
2112
                g_debug ("\n Portless card just registered - %i \n", gvc_mixer_card_get_index (card));
 
2113
 
2103
2114
                GObject *object;
2104
2115
                object = g_object_new (GVC_TYPE_MIXER_UI_DEVICE,
2105
2116
                                       "type", 0,
2142
2153
                                if (g_strcmp0 (card_port->port, info->ports[i]->name) == 0){
2143
2154
                                        if (card_port->available != info->ports[i]->available) {
2144
2155
                                                card_port->available = info->ports[i]->available;
2145
 
                                                g_print ("\n !!! sync port availability on card %i \n card port name %s \n new available value %i \n",
 
2156
                                                g_debug ("\n !!! sync port availability on card %i \n card port name %s \n new available value %i \n",
2146
2157
                                                          gvc_mixer_card_get_index (card),
2147
2158
                                                          card_port->port,
2148
2159
                                                          card_port->available);
2324
2335
                g_warning ("Server info callback failure");
2325
2336
                return;
2326
2337
        }
2327
 
        g_print ("\n get server info \n");
 
2338
        g_debug ("\n get server info \n");
2328
2339
        update_server (control, i);
2329
2340
        dec_outstanding (control);
2330
2341
}
2631
2642
                                               signals[OUTPUT_REMOVED],
2632
2643
                                               0,
2633
2644
                                               gvc_mixer_ui_device_get_id (device));
2634
 
                                g_print ("\n Card removal remove output device %s \n",
 
2645
                                g_debug ("\n Card removal remove output device %s \n",
2635
2646
                                         gvc_mixer_ui_device_get_description (device)); 
2636
2647
                                g_hash_table_remove (control->priv->ui_outputs,
2637
2648
                                                     GUINT_TO_POINTER (gvc_mixer_ui_device_get_id (device)));
2642
2653
                                               signals[INPUT_REMOVED],
2643
2654
                                               0,
2644
2655
                                               gvc_mixer_ui_device_get_id (device));
2645
 
                                g_print ("\n Card removal remove input device %s \n",
 
2656
                                g_debug ("\n Card removal remove input device %s \n",
2646
2657
                                         gvc_mixer_ui_device_get_description (device)); 
2647
2658
                                g_hash_table_remove (control->priv->ui_inputs,
2648
2659
                                                     GUINT_TO_POINTER (gvc_mixer_ui_device_get_id (device)));                                
2680
2691
        device = gvc_mixer_control_lookup_device_from_stream (control, stream);
2681
2692
 
2682
2693
        if (device != NULL){
2683
 
                g_print ("\n invalidate stream on device - remove-sinks - %s \n", gvc_mixer_ui_device_get_description (device));        
 
2694
                g_debug ("\n invalidate stream on device - remove-sinks - %s \n", gvc_mixer_ui_device_get_description (device));        
2684
2695
 
2685
2696
                gvc_mixer_ui_device_invalidate_stream (device);
2686
2697
                // If its a software device - get rid of it
2704
2715
                                             "stream-id", &stream_id,
2705
2716
                                              NULL);
2706
2717
                                if (stream_id == gvc_mixer_stream_get_id (stream)){
2707
 
                                        g_print ("\n invalidate stream on another relevant device - %s \n", gvc_mixer_ui_device_get_description (device)); 
 
2718
                                        g_debug ("\n invalidate stream on another relevant device - %s \n", gvc_mixer_ui_device_get_description (device)); 
2708
2719
                                        gvc_mixer_ui_device_invalidate_stream (device);
2709
2720
                                }
2710
2721
                        }
2736
2747
        device = gvc_mixer_control_lookup_device_from_stream (control, stream);
2737
2748
 
2738
2749
        if (device != NULL){
2739
 
                g_print ("\n invalidate stream on device - %s \n", gvc_mixer_ui_device_get_description (device));        
 
2750
                g_debug ("\n invalidate stream on device - %s \n", gvc_mixer_ui_device_get_description (device));        
2740
2751
 
2741
2752
                gvc_mixer_ui_device_invalidate_stream (device);
2742
2753
                // If its a software device - get rid of it
2761
2772
                                             "stream-id", &stream_id,
2762
2773
                                              NULL);
2763
2774
                                if (stream_id == gvc_mixer_stream_get_id (stream)){
2764
 
                                        g_print ("\n invalidate stream on another relevant device - %s \n", gvc_mixer_ui_device_get_description (device)); 
 
2775
                                        g_debug ("\n invalidate stream on another relevant device - %s \n", gvc_mixer_ui_device_get_description (device)); 
2765
2776
                                        gvc_mixer_ui_device_invalidate_stream (device);
2766
2777
                                }
2767
2778
                        }