osxaudio: Make some debug code compile conditionally
authorArun Raghavan <git@arunraghavan.net>
Fri, 28 Nov 2014 13:07:02 +0000 (18:37 +0530)
committerArun Raghavan <git@arunraghavan.net>
Mon, 15 Dec 2014 05:49:51 +0000 (11:19 +0530)
https://bugzilla.gnome.org/show_bug.cgi?id=740987

sys/osxaudio/gstosxcoreaudiohal.c

index 0fd4ab0..92e4046 100644 (file)
@@ -1152,9 +1152,11 @@ gst_core_audio_select_device_impl (AudioDeviceID * device_id, gboolean output)
 {
   AudioDeviceID *devices = NULL;
   AudioDeviceID default_device_id = 0;
-  AudioChannelLayout *channel_layout;
   gint i, ndevices = 0;
   gboolean res = FALSE;
+#ifdef GST_CORE_AUDIO_DEBUG
+  AudioChannelLayout *channel_layout;
+#endif
 
   devices = _audio_system_get_devices (&ndevices);
 
@@ -1165,6 +1167,7 @@ gst_core_audio_select_device_impl (AudioDeviceID * device_id, gboolean output)
 
   GST_DEBUG ("found %d audio device(s)", ndevices);
 
+#ifdef GST_CORE_AUDIO_DEBUG
   for (i = 0; i < ndevices; i++) {
     gchar *device_name;
 
@@ -1187,6 +1190,7 @@ gst_core_audio_select_device_impl (AudioDeviceID * device_id, gboolean output)
       g_free (device_name);
     }
   }
+#endif
 
   /* Find the ID of the default output device */
   default_device_id = _audio_system_get_default_device (output);