patches/gnome-media-07-supportdevices.diff
author gf115653
Fri, 15 Sep 2006 00:01:29 +0000
changeset 8142 d060998f7b4b
parent 8140 f227d16d716e
child 8876 c1657cf8f387
permissions -rw-r--r--
update
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     1
diff -urN gnome-media-2.16.1/gst-mixer/src/element.c gnome-media-2.16.1-hacked/gst-mixer/src/element.c
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     2
--- gnome-media-2.16.1/gst-mixer/src/element.c	2006-09-04 07:44:55.000000000 +1200
8142
gf115653
parents: 8140
diff changeset
     3
+++ gnome-media-2.16.1-hacked/gst-mixer/src/element.c	2006-09-15 12:07:01.665009000 +1200
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     4
@@ -215,7 +215,7 @@
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     5
 {
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     6
   struct {
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     7
     gchar *label;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     8
-    GtkWidget *page, *old_sep, *new_sep;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
     9
+    GtkWidget *page, *flagbuttonbox, *old_sep, *new_sep;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    10
     gboolean use;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    11
     gint pos, height, width;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    12
     GnomeVolumeControlTrack * (* get_track_widget) (GtkTable      *table,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    13
@@ -226,13 +226,13 @@
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    14
 						    GtkWidget     *right_sep,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    15
 						    GnomeAppBar   *appbar);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    16
   } content[4] = {
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    17
-    { _("Playback"), NULL, NULL, NULL, FALSE, 0, 5, 1,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    18
+    { _("Playback"), NULL, NULL, NULL, NULL, FALSE, 0, 5, 1,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    19
       gnome_volume_control_track_add_playback },
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    20
-    { _("Capture"),  NULL, NULL, NULL, FALSE, 0, 5, 1,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    21
+    { _("Capture"),  NULL, NULL, NULL, NULL, FALSE, 0, 5, 1,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    22
       gnome_volume_control_track_add_capture },
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    23
-    { _("Switches"), NULL, NULL, NULL, FALSE, 0, 1, 3,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    24
+    { _("Switches"), NULL, NULL, NULL, NULL, FALSE, 0, 1, 3,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    25
       gnome_volume_control_track_add_switch },
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    26
-    { _("Options"),  NULL, NULL, NULL, FALSE, 0, 1, 3,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    27
+    { _("Options"),  NULL, NULL, NULL, NULL, FALSE, 0, 1, 3,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    28
       gnome_volume_control_track_add_option }
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    29
   };
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    30
   gvc_whitelist list[] = whitelist_init_list;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    31
@@ -316,6 +316,10 @@
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    32
 					el->appbar);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    33
     gnome_volume_control_track_show (trkw, active);
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
    34
 
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    35
+    /* Only the first trkw on the page will return flagbuttonbox */
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    36
+    if (trkw->flagbuttonbox != NULL)
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    37
+       content[i].flagbuttonbox = trkw->flagbuttonbox;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    38
+
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    39
     g_object_set_data (G_OBJECT (track),
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    40
 		       "gnome-volume-control-trkw", trkw);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    41
 
8142
gf115653
parents: 8140
diff changeset
    42
@@ -359,8 +363,24 @@
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    43
     viewport = gtk_viewport_new (hadjustment, vadjustment);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    44
     gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
    45
 
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    46
-    gtk_container_add (GTK_CONTAINER (viewport), content[i].page);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    47
-    gtk_container_add (GTK_CONTAINER (view), viewport);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    48
+    if (content[i].flagbuttonbox != NULL) {
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    49
+       GtkWidget *vbox = gtk_vbox_new (FALSE, 0);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    50
+       GtkWidget *hbox = gtk_hbox_new (FALSE, 6);
8142
gf115653
parents: 8140
diff changeset
    51
+       GtkWidget *hbox2 = gtk_hbox_new (FALSE, 6);
gf115653
parents: 8140
diff changeset
    52
+       GtkWidget *separator = gtk_hseparator_new ();
gf115653
parents: 8140
diff changeset
    53
+       gtk_box_pack_start (GTK_BOX (hbox2), separator, TRUE, TRUE, 6);
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    54
+       gtk_box_pack_start (GTK_BOX (vbox), content[i].page, TRUE, TRUE, 6);
8142
gf115653
parents: 8140
diff changeset
    55
+       gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 6);
gf115653
parents: 8140
diff changeset
    56
+       gtk_box_pack_start (GTK_BOX (hbox), content[i].flagbuttonbox, TRUE, FALSE, 6);
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    57
+       gtk_widget_show(hbox);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    58
+       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 6);
8142
gf115653
parents: 8140
diff changeset
    59
+       gtk_widget_show_all (vbox);
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    60
+       gtk_container_add (GTK_CONTAINER (viewport), vbox);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    61
+       gtk_container_add (GTK_CONTAINER (view), viewport);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    62
+    } else {
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    63
+       gtk_container_add (GTK_CONTAINER (viewport), content[i].page);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    64
+       gtk_container_add (GTK_CONTAINER (view), viewport);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    65
+    }
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    66
 
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    67
     label = gtk_label_new (content[i].label);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    68
     gtk_notebook_append_page (GTK_NOTEBOOK (el), view, label);
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    69
diff -urN gnome-media-2.16.1/gst-mixer/src/track.c gnome-media-2.16.1-hacked/gst-mixer/src/track.c
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
    70
--- gnome-media-2.16.1/gst-mixer/src/track.c	2005-04-16 00:59:37.000000000 +1200
8142
gf115653
parents: 8140
diff changeset
    71
+++ gnome-media-2.16.1-hacked/gst-mixer/src/track.c	2006-09-15 12:07:01.714869000 +1200
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    72
@@ -19,6 +19,11 @@
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    73
  * Boston, MA 02111-1307, USA.
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    74
  */
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    75
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    76
+#ifdef __sun
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    77
+#include <fcntl.h>
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    78
+#include <sys/audio.h>
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    79
+#endif
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    80
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    81
 #ifdef HAVE_CONFIG_H
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    82
 #include "config.h"
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    83
 #endif
8142
gf115653
parents: 8140
diff changeset
    84
@@ -101,6 +106,134 @@
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    85
   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    86
 }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    87
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    88
+#ifdef __sun
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    89
+static gint mixer_fd;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    90
+static gboolean out_switch_display     = FALSE;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    91
+static gboolean in_switch_display      = FALSE;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    92
+static GtkWidget *out_speaker_button   = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    93
+static GtkWidget *out_headphone_button = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    94
+static GtkWidget *out_lineout_button   = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    95
+static GtkWidget *out_spdif_button     = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    96
+static GtkWidget *out_aux1_button      = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    97
+static GtkWidget *out_aux2_button      = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    98
+static GtkWidget *in_microphone_button = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
    99
+static GtkWidget *in_line_in_button    = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   100
+static GtkWidget *in_cd_button         = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   101
+static GtkWidget *in_spdif_button      = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   102
+static GtkWidget *in_aux1_button       = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   103
+static GtkWidget *in_aux2_button       = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   104
+static GtkWidget *in_codec_button      = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   105
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   106
+static void
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   107
+sun_out_button_cb (GtkToggleButton *tb, gpointer data)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   108
+{
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   109
+   audio_info_t ainfo;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   110
+   int ret;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   111
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   112
+   AUDIO_INITINFO (&ainfo);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   113
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   114
+   if (ioctl (mixer_fd, AUDIO_GETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   115
+      g_warning ("Error setting audio device information");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   116
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   117
+   if (out_speaker_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   118
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_speaker_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   119
+         ainfo.play.port |= AUDIO_SPEAKER;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   120
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   121
+         ainfo.play.port &= ~AUDIO_SPEAKER;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   122
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   123
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   124
+   if (out_headphone_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   125
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_headphone_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   126
+         ainfo.play.port |= AUDIO_HEADPHONE;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   127
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   128
+         ainfo.play.port &= ~AUDIO_HEADPHONE;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   129
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   130
+      
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   131
+   if (out_lineout_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   132
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_lineout_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   133
+         ainfo.play.port |= AUDIO_LINE_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   134
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   135
+         ainfo.play.port &= ~AUDIO_LINE_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   136
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   137
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   138
+   if (out_spdif_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   139
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_spdif_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   140
+         ainfo.play.port |= AUDIO_SPDIF_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   141
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   142
+         ainfo.play.port &= ~AUDIO_SPDIF_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   143
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   144
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   145
+   if (out_aux1_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   146
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_aux1_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   147
+         ainfo.play.port |= AUDIO_AUX1_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   148
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   149
+         ainfo.play.port &= ~AUDIO_AUX1_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   150
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   151
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   152
+   if (out_aux2_button != NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   153
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_aux2_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   154
+         ainfo.play.port |= AUDIO_AUX2_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   155
+      else
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   156
+         ainfo.play.port &= ~AUDIO_AUX2_OUT;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   157
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   158
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   159
+   if (ioctl (mixer_fd, AUDIO_SETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   160
+      g_warning ("Error setting audio device information");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   161
+}
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   162
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   163
+static void
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   164
+sun_in_button_cb (GtkToggleButton *tb, gpointer data)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   165
+{
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   166
+   audio_info_t ainfo;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   167
+   int ret;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   168
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   169
+   AUDIO_INITINFO (&ainfo);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   170
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   171
+   if (ioctl (mixer_fd, AUDIO_GETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   172
+      g_warning ("Error getting audio device information");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   173
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   174
+   if (in_microphone_button != NULL &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   175
+       tb == GTK_TOGGLE_BUTTON (in_microphone_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   176
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_microphone_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   177
+         ainfo.record.port = AUDIO_MICROPHONE;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   178
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   179
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   180
+   if (in_line_in_button != NULL &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   181
+       tb == GTK_TOGGLE_BUTTON (in_line_in_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   182
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_line_in_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   183
+         ainfo.record.port = AUDIO_LINE_IN;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   184
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   185
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   186
+   if (in_cd_button != NULL && tb == GTK_TOGGLE_BUTTON (in_cd_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   187
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_cd_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   188
+         ainfo.record.port = AUDIO_CD;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   189
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   190
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   191
+   if (in_spdif_button != NULL && tb == GTK_TOGGLE_BUTTON (in_spdif_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   192
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_spdif_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   193
+         ainfo.record.port = AUDIO_SPDIF_IN;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   194
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   195
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   196
+   if (in_aux1_button != NULL && tb == GTK_TOGGLE_BUTTON (in_aux1_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   197
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_aux1_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   198
+         ainfo.record.port = AUDIO_AUX1_IN;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   199
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   200
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   201
+   if (in_aux2_button != NULL && tb == GTK_TOGGLE_BUTTON (in_aux2_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   202
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_aux2_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   203
+         ainfo.record.port = AUDIO_AUX2_IN;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   204
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   205
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   206
+   if (in_codec_button != NULL && tb == GTK_TOGGLE_BUTTON (in_codec_button)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   207
+      if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_codec_button)))
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   208
+         ainfo.record.port = AUDIO_CODEC_LOOPB_IN;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   209
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   210
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   211
+   if (ioctl (mixer_fd, AUDIO_SETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   212
+      g_warning ("Error setting audio device information");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   213
+}
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   214
+#endif
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   215
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   216
 /*
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   217
  * Timeout to check for changes in mixer outside ourselves.
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   218
  */
8142
gf115653
parents: 8140
diff changeset
   219
@@ -149,6 +282,112 @@
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   220
    *     apps change device state.
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   221
    */
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   222
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   223
+#ifdef __sun
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   224
+  /*
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   225
+   * Update the Sun flag buttons, if they change.
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   226
+   */
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   227
+   {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   228
+      audio_info_t ainfo;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   229
+      int ret;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   230
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   231
+      if (ioctl (mixer_fd, AUDIO_GETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   232
+         g_warning ("Error setting audio device volume");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   233
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   234
+      if (out_speaker_button != NULL &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   235
+          (ainfo.play.avail_ports & AUDIO_SPEAKER) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   236
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_speaker_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   237
+          (ainfo.play.port & AUDIO_SPEAKER)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   238
+            gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_speaker_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   239
+               (ainfo.play.port & AUDIO_SPEAKER));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   240
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   241
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   242
+      if (out_headphone_button != NULL &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   243
+          (ainfo.play.avail_ports & AUDIO_HEADPHONE) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   244
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_headphone_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   245
+          (ainfo.play.port & AUDIO_HEADPHONE)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   246
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_headphone_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   247
+            (ainfo.play.port & AUDIO_HEADPHONE));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   248
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   249
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   250
+      if (out_lineout_button != NULL && (ainfo.play.avail_ports & AUDIO_LINE_OUT) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   251
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_lineout_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   252
+          (ainfo.play.port & AUDIO_LINE_OUT)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   253
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_lineout_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   254
+            (ainfo.play.port & AUDIO_LINE_OUT));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   255
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   256
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   257
+      if (out_spdif_button != NULL && (ainfo.play.avail_ports & AUDIO_SPDIF_OUT) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   258
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_spdif_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   259
+          (ainfo.play.port & AUDIO_SPDIF_OUT)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   260
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_spdif_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   261
+            (ainfo.play.port & AUDIO_SPDIF_OUT));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   262
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   263
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   264
+      if (out_aux1_button != NULL && (ainfo.play.avail_ports & AUDIO_AUX1_OUT) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   265
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_aux1_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   266
+          (ainfo.play.port & AUDIO_AUX1_OUT)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   267
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_aux1_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   268
+            (ainfo.play.port & AUDIO_AUX1_OUT));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   269
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   270
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   271
+      if (out_aux2_button != NULL && (ainfo.play.avail_ports & AUDIO_AUX2_OUT) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   272
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (out_aux2_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   273
+          (ainfo.play.port & AUDIO_AUX2_OUT)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   274
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_aux2_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   275
+            (ainfo.play.port & AUDIO_AUX2_OUT));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   276
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   277
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   278
+      if (in_microphone_button != NULL && (ainfo.record.avail_ports & AUDIO_MICROPHONE) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   279
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_microphone_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   280
+          (ainfo.record.port & AUDIO_MICROPHONE)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   281
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_microphone_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   282
+            (ainfo.record.port & AUDIO_MICROPHONE));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   283
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   284
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   285
+      if (in_line_in_button != NULL && (ainfo.record.avail_ports & AUDIO_LINE_IN) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   286
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_line_in_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   287
+          (ainfo.record.port & AUDIO_LINE_IN)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   288
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_line_in_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   289
+            (ainfo.record.port & AUDIO_LINE_IN));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   290
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   291
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   292
+      if (in_cd_button != NULL && (ainfo.record.avail_ports & AUDIO_CD) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   293
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_cd_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   294
+          (ainfo.record.port & AUDIO_CD)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   295
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_cd_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   296
+            (ainfo.record.port & AUDIO_CD));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   297
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   298
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   299
+      if (in_spdif_button != NULL && (ainfo.record.avail_ports & AUDIO_SPDIF_IN) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   300
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_spdif_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   301
+          (ainfo.record.port & AUDIO_SPDIF_IN)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   302
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_spdif_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   303
+            (ainfo.record.port & AUDIO_SPDIF_IN));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   304
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   305
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   306
+      if (in_aux1_button != NULL && (ainfo.record.avail_ports & AUDIO_AUX1_IN) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   307
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_aux1_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   308
+          (ainfo.record.port & AUDIO_AUX1_IN)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   309
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_aux1_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   310
+            (ainfo.record.port & AUDIO_AUX1_IN));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   311
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   312
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   313
+      if (in_aux2_button != NULL && (ainfo.record.avail_ports & AUDIO_AUX2_IN) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   314
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_aux2_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   315
+          (ainfo.record.port & AUDIO_AUX2_IN)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   316
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_aux2_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   317
+            (ainfo.record.port & AUDIO_AUX2_IN));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   318
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   319
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   320
+      if (in_codec_button != NULL && (ainfo.record.avail_ports & AUDIO_CODEC_LOOPB_IN) &&
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   321
+          gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (in_codec_button)) !=
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   322
+          (ainfo.record.port & AUDIO_CODEC_LOOPB_IN)) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   323
+         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_codec_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   324
+            (ainfo.record.port & AUDIO_CODEC_LOOPB_IN));
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   325
+      }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   326
+   }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   327
+#endif
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   328
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   329
   return (trkw->mute || trkw->record);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   330
 }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   331
 
8142
gf115653
parents: 8140
diff changeset
   332
@@ -181,6 +420,7 @@
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   333
   ctrl->table = table;
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   334
   ctrl->pos = tab_pos;
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   335
   ctrl->id = g_timeout_add (100, cb_check, ctrl);
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   336
+  ctrl->flagbuttonbox = NULL;
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   337
 
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   338
   /* image (optional) */
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   339
   for (i = 0; !found && pix[i].label != NULL; i++) {
8142
gf115653
parents: 8140
diff changeset
   340
@@ -323,6 +563,99 @@
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   341
   /* mute button */
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   342
   gnome_volume_control_track_put_switch (table, tab_pos, ctrl, appbar);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   343
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   344
+#ifdef __sun
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   345
+  /*
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   346
+   * Only create the flagbuttonbox once.
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   347
+   */
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   348
+  if (out_switch_display == FALSE) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   349
+     audio_info_t ainfo;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   350
+     const char *audiodev;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   351
+
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   352
+     out_switch_display  = TRUE;
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   353
+     ctrl->flagbuttonbox = gtk_vbox_new (FALSE, 0);
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   354
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   355
+     audiodev = g_getenv ("AUDIODEV");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   356
+     if (audiodev == NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   357
+       mixer_fd = open ("/dev/audioctl", O_RDWR | O_NONBLOCK);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   358
+     } else {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   359
+       gchar *device = g_strdup_printf ("/dev/%sctl", audiodev);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   360
+       mixer_fd = open (device, O_RDWR | O_NONBLOCK);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   361
+       g_free (device);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   362
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   363
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   364
+     if (ioctl (mixer_fd, AUDIO_GETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   365
+        g_warning ("Error setting audio device volume");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   366
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   367
+     if (ainfo.play.avail_ports & AUDIO_SPEAKER) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   368
+        out_speaker_button = gtk_check_button_new_with_mnemonic (_("_Built-in Speaker"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   369
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_speaker_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   370
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   371
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_speaker_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   372
+           ainfo.play.port & AUDIO_SPEAKER);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   373
+        gtk_widget_show (out_speaker_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   374
+        g_signal_connect (G_OBJECT (out_speaker_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   375
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   376
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   377
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   378
+     if (ainfo.play.avail_ports & AUDIO_HEADPHONE) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   379
+        /* Set mnemonic to "P" since "H" is already used by Help menu item */
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   380
+        out_headphone_button = gtk_check_button_new_with_mnemonic (_("Head_phone"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   381
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_headphone_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   382
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   383
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_headphone_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   384
+           ainfo.play.port & AUDIO_HEADPHONE);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   385
+        gtk_widget_show (out_headphone_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   386
+        g_signal_connect (G_OBJECT (out_headphone_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   387
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   388
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   389
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   390
+     if (ainfo.play.avail_ports & AUDIO_LINE_OUT) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   391
+        out_lineout_button = gtk_check_button_new_with_mnemonic (_("_Line Out"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   392
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_lineout_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   393
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   394
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_lineout_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   395
+           ainfo.play.port & AUDIO_LINE_OUT);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   396
+        gtk_widget_show (out_lineout_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   397
+        g_signal_connect (G_OBJECT (out_lineout_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   398
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   399
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   400
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   401
+     if (ainfo.play.avail_ports & AUDIO_SPDIF_OUT) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   402
+        out_spdif_button = gtk_check_button_new_with_mnemonic (_("_SPDIF Out"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   403
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_spdif_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   404
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   405
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_spdif_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   406
+           ainfo.play.port & AUDIO_SPDIF_OUT);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   407
+        gtk_widget_show (out_spdif_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   408
+        g_signal_connect (G_OBJECT (out_spdif_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   409
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   410
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   411
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   412
+     if (ainfo.play.avail_ports & AUDIO_AUX1_OUT) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   413
+        out_aux1_button = gtk_check_button_new_with_mnemonic (_("AUX_1 Out"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   414
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_aux1_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   415
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   416
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_aux1_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   417
+           ainfo.play.port & AUDIO_AUX1_OUT);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   418
+        gtk_widget_show (out_aux1_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   419
+        g_signal_connect (G_OBJECT (out_aux1_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   420
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   421
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   422
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   423
+     if (ainfo.play.avail_ports & AUDIO_AUX2_OUT) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   424
+        out_aux2_button = gtk_check_button_new_with_mnemonic (_("AUX_2 Out"));
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   425
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), out_aux2_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   426
+		            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   427
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (out_aux2_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   428
+           ainfo.play.port & AUDIO_AUX2_OUT);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   429
+        gtk_widget_show (out_aux2_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   430
+        g_signal_connect (G_OBJECT (out_aux2_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   431
+           G_CALLBACK (sun_out_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   432
+     }
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   433
+     gtk_widget_show (ctrl->flagbuttonbox);
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   434
+  }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   435
+#endif
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   436
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   437
   return ctrl;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   438
 }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   439
 
8142
gf115653
parents: 8140
diff changeset
   440
@@ -352,6 +685,7 @@
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   441
    *     is always FALSE.
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   442
    */
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   443
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   444
+#ifndef __sun
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   445
   /* only the record button here */
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   446
   msg = g_strdup_printf (_("Toggle audio capture from %s"), ctrl->track->label);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   447
   button = gnome_volume_control_button_new (GNOME_VOLUME_CONTROL_STOCK_RECORD,
8142
gf115653
parents: 8140
diff changeset
   448
@@ -379,6 +713,147 @@
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   449
 		      FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   450
   gtk_widget_show (button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   451
 
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   452
+#else
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   453
+  /*
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   454
+   * Only create the flagbuttonbox once.
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   455
+   *
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   456
+   * Note that we do not want to show the record button on Solaris,
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   457
+   * since this is managed by the flagbuttons defined below.
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   458
+   */
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   459
+  if (in_switch_display == FALSE) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   460
+     audio_info_t ainfo;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   461
+     const char *audiodev;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   462
+     GtkRadioButton *first_button = NULL;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   463
+
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   464
+     in_switch_display   = TRUE;
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   465
+     ctrl->flagbuttonbox = gtk_vbox_new (FALSE, 0);
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   466
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   467
+     audiodev = g_getenv ("AUDIODEV");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   468
+     if (audiodev == NULL) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   469
+       mixer_fd = open ("/dev/audioctl", O_RDWR | O_NONBLOCK);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   470
+     } else {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   471
+       gchar *device = g_strdup_printf ("/dev/%sctl", audiodev);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   472
+       mixer_fd = open (device, O_RDWR | O_NONBLOCK);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   473
+       g_free (device);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   474
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   475
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   476
+     if (ioctl (mixer_fd, AUDIO_GETINFO, &ainfo) < 0)
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   477
+        g_warning ("Error setting audio device volume");
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   478
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   479
+     if (ainfo.record.avail_ports & AUDIO_MICROPHONE) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   480
+        in_microphone_button = gtk_radio_button_new_with_mnemonic (NULL, _("Micro_phone"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   481
+        first_button = GTK_RADIO_BUTTON (in_microphone_button);
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   482
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_microphone_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   483
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   484
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_microphone_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   485
+           ainfo.record.port & AUDIO_MICROPHONE);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   486
+        gtk_widget_show (in_microphone_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   487
+        g_signal_connect (G_OBJECT (in_microphone_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   488
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   489
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   490
+     if (ainfo.record.avail_ports & AUDIO_LINE_IN) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   491
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   492
+           in_line_in_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   493
+              (first_button, _("_Line In"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   494
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   495
+           in_line_in_button = gtk_radio_button_new_with_mnemonic (NULL, _("_Line In"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   496
+           first_button = GTK_RADIO_BUTTON (in_line_in_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   497
+        }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   498
+        first_button = GTK_RADIO_BUTTON (in_line_in_button);
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   499
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_line_in_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   500
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   501
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_line_in_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   502
+           ainfo.record.port & AUDIO_LINE_IN);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   503
+        gtk_widget_show (in_line_in_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   504
+        g_signal_connect (G_OBJECT (in_line_in_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   505
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   506
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   507
+     if (ainfo.record.avail_ports & AUDIO_CD) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   508
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   509
+           in_cd_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   510
+              (first_button, _("_Internal CD"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   511
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   512
+           in_cd_button = gtk_radio_button_new_with_mnemonic (NULL, _("_Internal CD"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   513
+           first_button = GTK_RADIO_BUTTON (in_cd_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   514
+        }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   515
+        first_button = GTK_RADIO_BUTTON (in_cd_button);
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   516
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_cd_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   517
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   518
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_cd_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   519
+           ainfo.record.port & AUDIO_CD);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   520
+        gtk_widget_show (in_cd_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   521
+        g_signal_connect (G_OBJECT (in_cd_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   522
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   523
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   524
+     if (ainfo.record.avail_ports & AUDIO_SPDIF_IN) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   525
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   526
+           in_spdif_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   527
+              (first_button, _("_SPDIF In"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   528
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   529
+           in_spdif_button = gtk_radio_button_new_with_mnemonic (NULL, _("_SPDIF In"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   530
+           first_button = GTK_RADIO_BUTTON (in_spdif_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   531
+        }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   532
+
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   533
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_spdif_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   534
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   535
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_spdif_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   536
+           ainfo.record.port & AUDIO_SPDIF_IN);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   537
+        gtk_widget_show (in_spdif_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   538
+        g_signal_connect (G_OBJECT (in_spdif_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   539
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   540
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   541
+     if (ainfo.record.avail_ports & AUDIO_AUX1_IN) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   542
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   543
+           in_aux1_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   544
+              (first_button, _("AUX_1 Input"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   545
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   546
+           in_aux1_button = gtk_radio_button_new_with_mnemonic (NULL, _("AUX_1 Input"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   547
+           first_button = GTK_RADIO_BUTTON (in_aux1_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   548
+        }
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   549
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_aux1_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   550
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   551
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_aux1_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   552
+           ainfo.record.port & AUDIO_AUX1_IN);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   553
+        gtk_widget_show (in_aux1_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   554
+        g_signal_connect (G_OBJECT (in_aux1_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   555
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   556
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   557
+     if (ainfo.record.avail_ports & AUDIO_AUX2_IN) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   558
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   559
+           in_aux2_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   560
+              (first_button, _("AUX_2 Input"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   561
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   562
+           in_aux2_button = gtk_radio_button_new_with_mnemonic (NULL, _("AUX_2 Input"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   563
+           first_button = GTK_RADIO_BUTTON (in_aux2_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   564
+        }
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   565
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_aux2_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   566
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   567
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_aux2_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   568
+           ainfo.record.port & AUDIO_AUX2_IN);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   569
+        gtk_widget_show (in_aux2_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   570
+        g_signal_connect (G_OBJECT (in_aux2_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   571
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   572
+     }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   573
+     if (ainfo.record.avail_ports & AUDIO_CODEC_LOOPB_IN) {
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   574
+        if (first_button != NULL) {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   575
+           in_codec_button = gtk_radio_button_new_with_mnemonic_from_widget
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   576
+              (first_button, _("_Codec Loopback"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   577
+        } else {
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   578
+           in_codec_button = gtk_radio_button_new_with_mnemonic (NULL, _("_Codec Loopback"));
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   579
+           first_button = GTK_RADIO_BUTTON (in_codec_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   580
+        }
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   581
+        gtk_box_pack_start (GTK_BOX (ctrl->flagbuttonbox), in_codec_button,
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   582
+                            FALSE, FALSE, 0);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   583
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (in_codec_button),
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   584
+           ainfo.record.port & AUDIO_CODEC_LOOPB_IN);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   585
+        gtk_widget_show (in_codec_button);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   586
+        g_signal_connect (G_OBJECT (in_codec_button), "toggled",
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   587
+           G_CALLBACK (sun_in_button_cb), NULL);
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   588
+     }
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   589
+     gtk_widget_show (ctrl->flagbuttonbox);
7558
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   590
+  }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   591
+#endif
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   592
+
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   593
   return ctrl;
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   594
 }
97274ac9f147 2006-06-30 Brian Cameron <[email protected]>
bc99092
parents:
diff changeset
   595
 
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   596
diff -urN gnome-media-2.16.1/gst-mixer/src/track.h gnome-media-2.16.1-hacked/gst-mixer/src/track.h
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   597
--- gnome-media-2.16.1/gst-mixer/src/track.h	2006-01-20 12:52:21.000000000 +1300
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   598
+++ gnome-media-2.16.1-hacked/gst-mixer/src/track.h	2006-09-15 11:07:46.085891000 +1200
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   599
@@ -47,7 +47,8 @@
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   600
 	    *sliderbox,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   601
 	    *buttonbox,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   602
 	    *toggle,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   603
-	    *options;
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   604
+	    *options,
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   605
+	    *flagbuttonbox;
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   606
 
8139
ee5c36bf5a95 2006-09-15 Glynn Foster <[email protected]>
gf115653
parents: 7868
diff changeset
   607
   GnomeVolumeControlButton *mute, *record;
7868
e17250fb1342 2006-08-08 Brian Cameron <[email protected]>
bc99092
parents: 7558
diff changeset
   608