Mercurial > audlegacy
annotate Plugins/Output/crossfade/configure.c @ 261:5fd398406cf7 trunk
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
author | chainsaw |
---|---|
date | Tue, 06 Dec 2005 16:09:32 -0800 |
parents | |
children | 5410de731c3c |
rev | line source |
---|---|
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2 /* |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
3 * XMMS Crossfade Plugin |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
4 * Copyright (C) 2000-2004 Peter Eisenlohr <peter@eisenlohr.org> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
5 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
6 * based on the original OSS Output Plugin |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
7 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
8 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
9 * This program is free software; you can redistribute it and/or modify |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
10 * it under the terms of the GNU General Public License as published by |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
11 * the Free Software Foundation; either version 2 of the License, or |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
12 * (at your option) any later version. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
13 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
17 * GNU General Public License for more details. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
18 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
20 * along with this program; if not, write to the Free Software |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
22 * USA. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
23 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
24 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
25 #ifdef HAVE_CONFIG_H |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
26 # include "config.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
27 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
28 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
29 #undef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
30 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
31 #include "crossfade.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
32 #include "configure.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
33 #include "interface.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
34 #include "monitor.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
35 #include "support.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
36 #ifdef HAVE_OSS |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
37 # include "oss.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
38 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
39 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
40 #include <stdio.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
41 #include <string.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
42 #include <stdlib.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
43 #include <ctype.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
44 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
45 #include <fcntl.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
46 #include <unistd.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
47 #include <sys/ioctl.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
48 #include <sys/stat.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
49 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
50 #ifdef HAVE_OSS |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
51 # ifdef HAVE_SYS_SOUNDCARD_H |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
52 # include <sys/soundcard.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
53 # elif defined(HAVE_MACHINE_SOUNDCARD_H) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
54 # include <machine/soundcard.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
55 # endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
56 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
57 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
58 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
59 # include <samplerate.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
60 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
61 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
62 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
63 #define HIDE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
64 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
65 gtk_widget_hide(set_wgt); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
66 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
67 #define SHOW(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
68 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
69 gtk_widget_show(set_wgt); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
70 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
71 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
72 #define SETW_SENSITIVE(wgt, sensitive) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
73 gtk_widget_set_sensitive(wgt, sensitive) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
74 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
75 #define SETW_TOGGLE(wgt, active) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
76 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wgt), active) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
77 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
78 #define SETW_SPIN(wgt, value) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
79 gtk_spin_button_set_value(GTK_SPIN_BUTTON(wgt), value) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
80 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
81 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
82 #define SET_SENSITIVE(name, sensitive) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
83 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
84 gtk_widget_set_sensitive(set_wgt, sensitive); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
85 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
86 #define SET_TOGGLE(name, active) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
87 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
88 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(set_wgt), active); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
89 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
90 #define SET_SPIN(name, value) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
91 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
92 gtk_spin_button_set_value(GTK_SPIN_BUTTON(set_wgt), value); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
93 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
94 #define SET_PAGE(name, index) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
95 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
96 gtk_notebook_set_page(GTK_NOTEBOOK(set_wgt), index); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
97 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
98 #define SET_HISTORY(name, index) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
99 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
100 gtk_option_menu_set_history(GTK_OPTION_MENU(set_wgt), index); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
101 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
102 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
103 #define GET_SENSITIVE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
104 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
105 && GTK_WIDGET_SENSITIVE(get_wgt)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
106 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
107 #define GET_TOGGLE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
108 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
109 && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(get_wgt))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
110 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
111 #define GET_SPIN(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
112 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
113 ? gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(get_wgt)) : 0) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
114 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
115 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
116 static GtkWidget *config_win = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
117 static GtkWidget *about_win = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
118 static GtkWidget *set_wgt; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
119 static GtkWidget *get_wgt; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
120 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
121 /* init with DEFAULT_CFG to make sure all string pointers are set to NULL */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
122 static config_t _cfg = CONFIG_DEFAULT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
123 static config_t *cfg = &_cfg; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
124 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
125 /* some helpers to keep track of the GUI's state */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
126 static gboolean checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
127 static gint op_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
128 static plugin_config_t op_config; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
129 static gint ep_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
130 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
131 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
132 static void update_plugin_config(gchar **config_string, gchar *name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
133 plugin_config_t *pc, gboolean save); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
134 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
135 /*****************************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
136 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
137 void g_free_f(gpointer data, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
138 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
139 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
140 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
141 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
142 /*****************************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
143 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
144 #ifdef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
145 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
146 scan_presets(gchar *filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
147 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
148 struct stat stats; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
149 FILE *fh; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
150 gchar *data, **lines, *tmp, *name; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
151 int i; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
152 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
153 if(lstat(filename, &stats)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
154 DEBUG(("[crossfade] scan_presets: \"%s\":\n", filename)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
155 PERROR("[crossfade] scan_presets: lstat"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
156 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
157 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
158 if(stats.st_size <= 0) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
159 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
160 if(!(data = g_malloc(stats.st_size + 1))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
161 DEBUG(("[crossfade] scan_presets: g_malloc(%ld) failed!\n", stats.st_size)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
162 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
163 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
164 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
165 if(!(fh = fopen(filename, "r"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
166 PERROR("[crossfade] scan_presets: fopen"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
167 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
168 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
169 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
170 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
171 if(fread(data, stats.st_size, 1, fh) != 1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
172 DEBUG(("[crossfade] scan_presets: fread() failed!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
173 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
174 fclose(fh); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
175 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
176 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
177 fclose(fh); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
178 data[stats.st_size] = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
179 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
180 lines = g_strsplit(data, "\n", 0); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
181 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
182 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
183 if(!lines) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
184 DEBUG(("[crossfade] scan_presets: g_strsplit() failed!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
185 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
186 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
187 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
188 g_list_foreach(config->presets, g_free_f, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
189 g_list_free(config->presets); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
190 config->presets = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
191 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
192 for(i=0; lines[i]; i++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
193 if(lines[i][0] == '[') { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
194 if((tmp = strchr(lines[i], ']'))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
195 *tmp = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
196 if((name = g_strdup(lines[i]+1))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
197 config->presets = g_list_append(config->presets, name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
198 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
199 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
200 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
201 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
202 g_strfreev(lines); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
203 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
204 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
205 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
206 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
207 read_fade_config(ConfigFile *cfgfile, gchar *section, gchar *key, fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
208 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
209 gchar *s = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
210 gint n; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
211 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
212 if(!cfgfile || !section || !key || !fc) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
213 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
214 xmms_cfg_read_string(cfgfile, section, key, &s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
215 if(!s) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
216 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
217 n = sscanf(s, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
218 "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
219 &fc->type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
220 &fc->pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
221 &fc->simple_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
222 &fc->out_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
223 &fc->out_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
224 &fc->out_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
225 &fc->ofs_type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
226 &fc->ofs_type_wanted, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
227 &fc->ofs_custom_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
228 &fc->in_locked, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
229 &fc->in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
230 &fc->in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
231 &fc->in_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
232 &fc->flush_pause_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
233 &fc->flush_pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
234 &fc->flush_in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
235 &fc->flush_in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
236 &fc->flush_in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
237 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
238 g_free(s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
239 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
240 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
241 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
242 write_fade_config(ConfigFile *cfgfile, gchar *section, gchar *key, fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
243 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
244 gchar *s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
245 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
246 if(!cfgfile || !section || !key || !fc) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
247 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
248 s = g_strdup_printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
249 fc->type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
250 fc->pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
251 fc->simple_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
252 fc->out_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
253 fc->out_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
254 fc->out_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
255 fc->ofs_type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
256 fc->ofs_type_wanted, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
257 fc->ofs_custom_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
258 fc->in_locked, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
259 fc->in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
260 fc->in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
261 fc->in_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
262 fc->flush_pause_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
263 fc->flush_pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
264 fc->flush_in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
265 fc->flush_in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
266 fc->flush_in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
267 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
268 if(!s) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
269 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
270 xmms_cfg_write_string(cfgfile, section, key, s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
271 g_free(s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
272 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
273 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
274 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
275 xfade_load_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
276 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
277 #ifdef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
278 gchar *filename; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
279 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
280 gchar *section = "Crossfade"; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
281 ConfigFile *cfgfile; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
282 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
283 if((cfgfile = xmms_cfg_open_default_file())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
284 /* config items used in v0.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
285 xmms_cfg_read_int (cfgfile, section, "output_method", &config->output_method); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
286 xmms_cfg_read_int (cfgfile, section, "audio_device", &config->oss_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
287 xmms_cfg_read_boolean(cfgfile, section, "use_alt_audio_device", &config->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
288 xmms_cfg_read_string (cfgfile, section, "alt_audio_device", &config->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
289 xmms_cfg_read_int (cfgfile, section, "mixer_device", &config->oss_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
290 xmms_cfg_read_string (cfgfile, section, "output_plugin", &config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
291 xmms_cfg_read_string (cfgfile, section, "op_config_string", &config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
292 xmms_cfg_read_int (cfgfile, section, "buffer_size", &config->mix_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
293 xmms_cfg_read_int (cfgfile, section, "sync_size", &config->sync_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
294 xmms_cfg_read_int (cfgfile, section, "preload_size", &config->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
295 xmms_cfg_read_int (cfgfile, section, "songchange_timeout", &config->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
296 xmms_cfg_read_boolean(cfgfile, section, "enable_mixer", &config->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
297 xmms_cfg_read_boolean(cfgfile, section, "mixer_reverse", &config->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
298 xmms_cfg_read_boolean(cfgfile, section, "enable_debug", &config->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
299 xmms_cfg_read_boolean(cfgfile, section, "enable_monitor", &config->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
300 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
301 /* config items introduced by v0.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
302 xmms_cfg_read_int (cfgfile, section, "oss_buffer_size", &config->oss_buffer_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
303 xmms_cfg_read_int (cfgfile, section, "oss_preload_size", &config->oss_preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
304 xmms_cfg_read_boolean(cfgfile, section, "oss_mixer_use_master", &config->oss_mixer_use_master); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
305 xmms_cfg_read_boolean(cfgfile, section, "gap_lead_enable", &config->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
306 xmms_cfg_read_int (cfgfile, section, "gap_lead_len_ms", &config->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
307 xmms_cfg_read_int (cfgfile, section, "gap_lead_level", &config->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
308 xmms_cfg_read_boolean(cfgfile, section, "gap_trail_enable", &config->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
309 xmms_cfg_read_int (cfgfile, section, "gap_trail_len_ms", &config->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
310 xmms_cfg_read_int (cfgfile, section, "gap_trail_level", &config->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
311 xmms_cfg_read_int (cfgfile, section, "gap_trail_locked", &config->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
312 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
313 /* config items introduced by v0.2.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
314 xmms_cfg_read_boolean(cfgfile, section, "buffer_size_auto", &config->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
315 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
316 /* config items introduced by v0.2.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
317 xmms_cfg_read_boolean(cfgfile, section, "album_detection", &config->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
318 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
319 /* config items introduced by v0.2.4 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
320 xmms_cfg_read_boolean(cfgfile, section, "http_workaround", &config->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
321 xmms_cfg_read_boolean(cfgfile, section, "enable_op_max_used", &config->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
322 xmms_cfg_read_int (cfgfile, section, "op_max_used_ms", &config->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
323 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
324 /* config items introduced by v0.2.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
325 xmms_cfg_read_string (cfgfile, section, "effect_plugin", &config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
326 xmms_cfg_read_boolean(cfgfile, section, "effect_enable", &config->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
327 xmms_cfg_read_int (cfgfile, section, "output_rate", &config->output_rate); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
328 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
329 /* config items introduced by v0.2.7 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
330 xmms_cfg_read_boolean(cfgfile, section, "oss_maxbuf_enable", &config->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
331 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
332 /* config items introduced by v0.3.0 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
333 xmms_cfg_read_boolean(cfgfile, section, "use_alt_mixer_device", &config->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
334 xmms_cfg_read_int (cfgfile, section, "oss_fragments", &config->oss_fragments); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
335 xmms_cfg_read_int (cfgfile, section, "oss_fragment_size", &config->oss_fragment_size); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
336 xmms_cfg_read_boolean(cfgfile, section, "volnorm_enable", &config->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
337 xmms_cfg_read_boolean(cfgfile, section, "volnorm_use_qa", &config->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
338 xmms_cfg_read_int (cfgfile, section, "volnorm_target", &config->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
339 xmms_cfg_read_boolean(cfgfile, section, "output_keep_opened", &config->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
340 xmms_cfg_read_boolean(cfgfile, section, "mixer_software", &config->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
341 xmms_cfg_read_int (cfgfile, section, "mixer_vol_left", &config->mixer_vol_left); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
342 xmms_cfg_read_int (cfgfile, section, "mixer_vol_right", &config->mixer_vol_right); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
343 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
344 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
345 xmms_cfg_read_boolean(cfgfile, section, "no_xfade_if_same_file",&config->no_xfade_if_same_file); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
346 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
347 /* config items introduced by v0.3.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
348 xmms_cfg_read_string (cfgfile, section, "alt_mixer_device", &config->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
349 xmms_cfg_read_boolean(cfgfile, section, "gap_crossing", &config->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
350 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
351 /* config items introduced by v0.3.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
352 xmms_cfg_read_int (cfgfile, section, "output_quality", &config->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
353 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
354 /* fade configs */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
355 read_fade_config(cfgfile, section, "fc_xfade", &config->fc[FADE_CONFIG_XFADE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
356 read_fade_config(cfgfile, section, "fc_manual", &config->fc[FADE_CONFIG_MANUAL]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
357 read_fade_config(cfgfile, section, "fc_album", &config->fc[FADE_CONFIG_ALBUM]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
358 read_fade_config(cfgfile, section, "fc_start", &config->fc[FADE_CONFIG_START]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
359 read_fade_config(cfgfile, section, "fc_stop", &config->fc[FADE_CONFIG_STOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
360 read_fade_config(cfgfile, section, "fc_eop", &config->fc[FADE_CONFIG_EOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
361 read_fade_config(cfgfile, section, "fc_seek", &config->fc[FADE_CONFIG_SEEK]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
362 read_fade_config(cfgfile, section, "fc_pause", &config->fc[FADE_CONFIG_PAUSE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
363 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
364 xmms_cfg_free(cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
365 DEBUG(("[crossfade] load_config: configuration loaded\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
366 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
367 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
368 DEBUG(("[crossfade] load_config: error loading config, using defaults\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
369 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
370 #ifdef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
371 filename = g_strconcat(g_get_home_dir(), "/.xmms/xmms-crossfade-presets", NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
372 scan_presets(filename); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
373 g_free(filename); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
374 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
375 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
376 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
377 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
378 xfade_save_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
379 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
380 gchar *section = "Crossfade"; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
381 ConfigFile *cfgfile; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
382 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
383 if((cfgfile = xmms_cfg_open_default_file())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
384 /* obsolete config items */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
385 xmms_cfg_remove_key(cfgfile, section, "underrun_pct"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
386 xmms_cfg_remove_key(cfgfile, section, "enable_crossfade"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
387 xmms_cfg_remove_key(cfgfile, section, "enable_gapkiller"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
388 xmms_cfg_remove_key(cfgfile, section, "mixer_use_master"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
389 xmms_cfg_remove_key(cfgfile, section, "late_effect"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
390 xmms_cfg_remove_key(cfgfile, section, "gap_lead_length"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
391 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
392 /* config items used in v0.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
393 xmms_cfg_write_int (cfgfile, section, "output_method", config->output_method); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
394 xmms_cfg_write_int (cfgfile, section, "audio_device", config->oss_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
395 xmms_cfg_write_boolean(cfgfile, section, "use_alt_audio_device", config->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
396 xmms_cfg_write_string (cfgfile, section, "alt_audio_device", config->oss_alt_audio_device ? config->oss_alt_audio_device : DEFAULT_OSS_ALT_AUDIO_DEVICE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
397 xmms_cfg_write_int (cfgfile, section, "mixer_device", config->oss_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
398 xmms_cfg_write_string (cfgfile, section, "output_plugin", config->op_name ? config->op_name : DEFAULT_OP_NAME); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
399 xmms_cfg_write_string (cfgfile, section, "op_config_string", config->op_config_string ? config->op_config_string : DEFAULT_OP_CONFIG_STRING); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
400 xmms_cfg_write_int (cfgfile, section, "buffer_size", config->mix_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
401 xmms_cfg_write_int (cfgfile, section, "sync_size", config->sync_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
402 xmms_cfg_write_int (cfgfile, section, "preload_size", config->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
403 xmms_cfg_write_int (cfgfile, section, "songchange_timeout", config->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
404 xmms_cfg_write_boolean(cfgfile, section, "enable_mixer", config->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
405 xmms_cfg_write_boolean(cfgfile, section, "mixer_reverse", config->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
406 xmms_cfg_write_boolean(cfgfile, section, "enable_debug", config->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
407 xmms_cfg_write_boolean(cfgfile, section, "enable_monitor", config->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
408 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
409 /* config items introduced by v0.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
410 xmms_cfg_write_int (cfgfile, section, "oss_buffer_size", config->oss_buffer_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
411 xmms_cfg_write_int (cfgfile, section, "oss_preload_size", config->oss_preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
412 xmms_cfg_write_boolean(cfgfile, section, "oss_mixer_use_master", config->oss_mixer_use_master); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
413 xmms_cfg_write_boolean(cfgfile, section, "gap_lead_enable", config->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
414 xmms_cfg_write_int (cfgfile, section, "gap_lead_len_ms", config->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
415 xmms_cfg_write_int (cfgfile, section, "gap_lead_level", config->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
416 xmms_cfg_write_boolean(cfgfile, section, "gap_trail_enable", config->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
417 xmms_cfg_write_int (cfgfile, section, "gap_trail_len_ms", config->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
418 xmms_cfg_write_int (cfgfile, section, "gap_trail_level", config->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
419 xmms_cfg_write_int (cfgfile, section, "gap_trail_locked", config->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
420 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
421 /* config items introduced by v0.2.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
422 xmms_cfg_write_boolean(cfgfile, section, "buffer_size_auto", config->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
423 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
424 /* config items introduced by v0.2.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
425 xmms_cfg_write_boolean(cfgfile, section, "album_detection", config->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
426 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
427 /* config items introduced by v0.2.4 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
428 xmms_cfg_write_boolean(cfgfile, section, "http_workaround", config->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
429 xmms_cfg_write_boolean(cfgfile, section, "enable_op_max_used", config->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
430 xmms_cfg_write_int (cfgfile, section, "op_max_used_ms", config->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
431 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
432 /* config items introduced by v0.2.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
433 xmms_cfg_write_string (cfgfile, section, "effect_plugin", config->ep_name ? config->ep_name : DEFAULT_EP_NAME); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
434 xmms_cfg_write_boolean(cfgfile, section, "effect_enable", config->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
435 xmms_cfg_write_int (cfgfile, section, "output_rate", config->output_rate); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
436 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
437 /* config items introduced by v0.2.7 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
438 xmms_cfg_write_boolean(cfgfile, section, "oss_maxbuf_enable", config->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
439 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
440 /* config items introduced by v0.3.0 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
441 xmms_cfg_write_boolean(cfgfile, section, "use_alt_mixer_device", config->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
442 xmms_cfg_write_int (cfgfile, section, "oss_fragments", config->oss_fragments); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
443 xmms_cfg_write_int (cfgfile, section, "oss_fragment_size", config->oss_fragment_size); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
444 #ifdef VOLUME_NORMALIZER |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
445 xmms_cfg_write_boolean(cfgfile, section, "volnorm_enable", config->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
446 xmms_cfg_write_boolean(cfgfile, section, "volnorm_use_qa", config->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
447 xmms_cfg_write_int (cfgfile, section, "volnorm_target", config->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
448 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
449 xmms_cfg_write_boolean(cfgfile, section, "output_keep_opened", config->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
450 xmms_cfg_write_boolean(cfgfile, section, "mixer_software", config->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
451 xmms_cfg_write_int (cfgfile, section, "mixer_vol_left", config->mixer_vol_left); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
452 xmms_cfg_write_int (cfgfile, section, "mixer_vol_right", config->mixer_vol_right); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
453 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
454 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
455 xmms_cfg_write_boolean(cfgfile, section, "no_xfade_if_same_file",config->no_xfade_if_same_file); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
456 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
457 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
458 xmms_cfg_write_string (cfgfile, section, "alt_mixer_device", config->oss_alt_mixer_device ? config->oss_alt_mixer_device : DEFAULT_OSS_ALT_MIXER_DEVICE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
459 xmms_cfg_write_boolean(cfgfile, section, "gap_crossing", config->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
460 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
461 /* config items introduced by v0.3.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
462 xmms_cfg_write_int (cfgfile, section, "output_quality", config->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
463 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
464 /* fade configs */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
465 write_fade_config(cfgfile, section, "fc_xfade", &config->fc[FADE_CONFIG_XFADE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
466 write_fade_config(cfgfile, section, "fc_manual", &config->fc[FADE_CONFIG_MANUAL]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
467 write_fade_config(cfgfile, section, "fc_album", &config->fc[FADE_CONFIG_ALBUM]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
468 write_fade_config(cfgfile, section, "fc_start", &config->fc[FADE_CONFIG_START]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
469 write_fade_config(cfgfile, section, "fc_stop", &config->fc[FADE_CONFIG_STOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
470 write_fade_config(cfgfile, section, "fc_eop", &config->fc[FADE_CONFIG_EOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
471 write_fade_config(cfgfile, section, "fc_seek", &config->fc[FADE_CONFIG_SEEK]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
472 write_fade_config(cfgfile, section, "fc_pause", &config->fc[FADE_CONFIG_PAUSE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
473 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
474 xmms_cfg_write_default_file(cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
475 xmms_cfg_free (cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
476 DEBUG(("[crossfade] save_config: configuration saved\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
477 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
478 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
479 DEBUG(("[crossfade] save_config: error saving configuration!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
480 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
481 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
482 #define SAFE_FREE(x) if(x) { g_free(x); x = NULL; } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
483 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
484 xfade_free_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
485 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
486 SAFE_FREE(cfg->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
487 SAFE_FREE(cfg->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
488 SAFE_FREE(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
489 SAFE_FREE(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
490 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
491 g_list_foreach(config->presets, g_free_f, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
492 g_list_free(config->presets); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
493 config->presets = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
494 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
495 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
496 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
497 xfade_load_plugin_config(gchar *config_string, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
498 gchar *plugin_name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
499 plugin_config_t *plugin_config) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
500 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
501 update_plugin_config(&config_string, plugin_name, plugin_config, FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
502 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
503 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
504 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
505 xfade_save_plugin_config(gchar **config_string, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
506 gchar *plugin_name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
507 plugin_config_t *plugin_config) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
508 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
509 update_plugin_config(config_string, plugin_name, plugin_config, TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
510 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
511 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
512 /*** helpers *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
513 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
514 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
515 xfade_cfg_fadeout_len(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
516 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
517 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
518 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
519 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
520 return fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
521 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
522 return fc->out_enable ? fc->out_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
523 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
524 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
525 return fc->out_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
526 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
527 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
528 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
529 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
530 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
531 xfade_cfg_fadeout_volume(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
532 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
533 gint volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
534 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
535 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
536 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
537 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
538 volume = fc->out_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
539 if(volume < 0) volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
540 if(volume > 100) volume = 100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
541 return volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
542 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
543 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
544 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
545 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
546 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
547 xfade_cfg_offset(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
548 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
549 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
550 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
551 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
552 return fc->flush_pause_enable ? fc->flush_pause_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
553 case FADE_TYPE_PAUSE: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
554 return fc->pause_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
555 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
556 return -fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
557 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
558 switch(fc->ofs_type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
559 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
560 return -fc->out_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
561 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
562 return -fc->in_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
563 case FC_OFFSET_CUSTOM: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
564 return fc->ofs_custom_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
565 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
566 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
567 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
568 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
569 return fc->ofs_custom_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
570 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
571 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
572 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
573 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
574 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
575 xfade_cfg_fadein_len(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
576 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
577 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
578 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
579 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
580 return fc->flush_in_enable ? fc->flush_in_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
581 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
582 return fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
583 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
584 return |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
585 fc->in_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
586 ? (fc->out_enable ? fc->out_len_ms : 0) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
587 : (fc->in_enable ? fc->in_len_ms : 0); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
588 case FADE_TYPE_FADEIN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
589 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
590 return fc->in_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
591 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
592 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
593 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
594 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
595 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
596 xfade_cfg_fadein_volume(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
597 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
598 gint volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
599 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
600 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
601 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
602 volume = fc->flush_in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
603 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
604 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
605 volume = fc->in_locked ? fc->out_volume : fc->in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
606 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
607 case FADE_TYPE_FADEIN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
608 volume = fc->in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
609 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
610 default: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
611 volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
612 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
613 if(volume < 0) volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
614 if(volume > 100) volume = 100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
615 return volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
616 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
617 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
618 gboolean |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
619 xfade_cfg_gap_trail_enable(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
620 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
621 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
622 ? cfg->gap_lead_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
623 : cfg->gap_trail_enable; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
624 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
625 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
626 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
627 xfade_cfg_gap_trail_len(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
628 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
629 if(!xfade_cfg_gap_trail_enable(cfg)) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
630 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
631 ? cfg->gap_lead_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
632 : cfg->gap_trail_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
633 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
634 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
635 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
636 xfade_cfg_gap_trail_level(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
637 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
638 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
639 ? cfg->gap_lead_level |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
640 : cfg->gap_trail_level; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
641 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
642 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
643 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
644 xfade_mix_size_ms(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
645 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
646 if(cfg->mix_size_auto) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
647 gint i, min_size = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
648 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
649 for(i=0; i<MAX_FADE_CONFIGS; i++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
650 gint size = xfade_cfg_fadeout_len(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
651 gint offset = xfade_cfg_offset(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
652 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
653 if(cfg->fc[i].type == FADE_TYPE_PAUSE_ADV) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
654 size += xfade_cfg_fadein_len(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
655 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
656 if(size < -offset) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
657 size = -offset; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
658 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
659 if(size > min_size) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
660 min_size = size; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
661 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
662 return min_size += xfade_cfg_gap_trail_len(cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
663 + cfg->songchange_timeout; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
664 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
665 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
666 return cfg->mix_size_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
667 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
668 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
669 /*** internal helpers ********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
670 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
671 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
672 add_menu_item(GtkWidget *menu, gchar *title, GtkSignalFunc func, gint index, gint **imap) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
673 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
674 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
675 if(!menu || !title || !func) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
676 item = gtk_menu_item_new_with_label(title); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
677 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(func), (gpointer)index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
678 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
679 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
680 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
681 if(imap) *((*imap)++) = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
682 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
683 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
684 /*** output method ***********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
685 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
686 /*-- callbacks --------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
687 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
688 void on_output_oss_radio_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
689 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
690 SET_PAGE("output_notebook", 0); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
691 cfg->output_method = OUTPUT_METHOD_BUILTIN_OSS; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
692 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
693 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
694 void on_output_plugin_radio_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
695 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
696 SET_PAGE("output_notebook", 1); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
697 cfg->output_method = OUTPUT_METHOD_PLUGIN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
698 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
699 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
700 void on_output_none_radio_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
701 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
702 SET_PAGE("output_notebook", 2); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
703 cfg->output_method = OUTPUT_METHOD_BUILTIN_NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
704 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
705 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
706 static void resampling_rate_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
707 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
708 cfg->output_rate = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
709 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
710 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
711 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
712 static void resampling_quality_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
713 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
714 cfg->output_quality = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
715 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
716 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
717 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
718 /*** oss output **************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
719 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
720 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
721 scan_devices(gchar *type, GtkWidget *option_menu, GtkSignalFunc signal_f) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
722 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
723 #ifdef HAVE_OSS |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
724 gchar buffer[256]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
725 FILE *file; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
726 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
727 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
728 gboolean found = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
729 gint type_len = strlen(type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
730 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
731 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
732 GtkWidget *menu; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
733 gint index = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
734 gint mixer = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
735 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
736 menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
737 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
738 #ifdef HAVE_OSS |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
739 /* look for devices in /dev/sndstat or /proc/asound/sndstat (OSS style) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
740 if((file = fopen("/dev/sndstat", "r")) || |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
741 (file = fopen("/proc/asound/sndstat", "r")) || |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
742 (file = fopen("/proc/asound/oss/sndstat", "r"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
743 while(fgets(buffer, sizeof(buffer), file)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
744 gint i = strlen(buffer)-1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
745 while((i >= 0) && isspace(buffer[i])) buffer[i--] = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
746 if(found) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
747 if(!buffer[0] || !isdigit(buffer[0])) break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
748 if(index == 0) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
749 gchar *label, *p = strchr(buffer, ':'); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
750 if(p) do p++; while(*p == ' '); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
751 else p = buffer; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
752 label = g_strdup_printf("Default (%s)", p); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
753 item = gtk_menu_item_new_with_label(label); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
754 g_free(label); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
755 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
756 else item = gtk_menu_item_new_with_label(buffer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
757 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
758 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(signal_f), |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
759 (gpointer)index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
760 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
761 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
762 index++; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
763 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
764 else if(!strcmp(buffer, type)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
765 found = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
766 else if(!strncmp(buffer, type, type_len)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
767 DEBUG(("[crossfade] scan_devices: %s\n", buffer)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
768 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
769 fclose(file); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
770 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
771 if(!found) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
772 DEBUG(("[crossfade] scan_devices: section \"%s\" not found!\n", type)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
773 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
774 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
775 DEBUG(("[crossfade] scan_devices: no sndstat found!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
776 #ifdef SOUND_MIXER_INFO |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
777 /* from xmms-3dse7 by Frank Cornelis */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
778 DEBUG(("[crossfade] scan_devices: using alternate method...\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
779 for(;;) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
780 gchar dev_name[32]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
781 int fd; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
782 mixer_info info; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
783 gchar *label; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
784 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
785 if(mixer != 0) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
786 sprintf(dev_name, "/dev/mixer%d", mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
787 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
788 strcpy(dev_name, "/dev/mixer"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
789 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
790 if((fd = open(dev_name, O_RDONLY)) != -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
791 if(ioctl(fd, SOUND_MIXER_INFO, &info) != -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
792 label = g_strdup_printf(index ? "%s" : "Default (%s)", info.name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
793 add_menu_item(menu, label, signal_f, index, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
794 g_free(label); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
795 index++; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
796 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
797 close(fd); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
798 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
799 else break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
800 mixer++; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
801 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
802 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
803 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
804 #endif /* HAVE_OSS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
805 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
806 /* create default entry if no device(s) could be found */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
807 if(index == 0) add_menu_item(menu, "Default", signal_f, 0, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
808 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
809 /* attach menu */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
810 gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
811 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
812 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
813 /*-- oss output callbacks ---------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
814 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
815 void check_oss_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
816 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
817 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
818 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
819 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
820 SET_SENSITIVE("oss_adevice_optionmenu", !cfg->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
821 SET_SENSITIVE("oss_adevice_alt_entry", cfg->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
822 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
823 SET_SENSITIVE("oss_mdevice_optionmenu", !cfg->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
824 SET_SENSITIVE("oss_mdevice_alt_entry", cfg->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
825 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
826 SET_SENSITIVE("osshwb_fragments_label", !cfg->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
827 SET_SENSITIVE("osshwb_fragments_spin", !cfg->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
828 SET_SENSITIVE("osshwb_fragsize_label", !cfg->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
829 SET_SENSITIVE("osshwb_fragsize_spin", !cfg->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
830 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
831 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
832 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
833 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
834 void config_adevice_cb(GtkWidget *widget, gint device) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
835 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
836 cfg->oss_audio_device = device; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
837 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
838 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
839 void config_mdevice_cb(GtkWidget *widget, gint device) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
840 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
841 cfg->oss_mixer_device = device; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
842 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
843 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
844 void on_config_adevice_alt_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
845 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
846 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
847 cfg->oss_use_alt_audio_device = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
848 check_oss_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
849 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
850 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
851 void on_config_mdevice_alt_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
852 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
853 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
854 cfg->oss_use_alt_mixer_device = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
855 check_oss_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
856 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
857 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
858 void on_osshwb_maxbuf_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
859 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
860 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
861 cfg->oss_maxbuf_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
862 check_oss_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
863 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
864 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
865 /*** plugin output ***********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
866 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
867 static gchar * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
868 strip(gchar *s) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
869 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
870 gchar *p; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
871 if(!s) return NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
872 for(; *s == ' '; s++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
873 if(!*s) return s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
874 for(p = s+strlen(s)-1; *p == ' '; p--); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
875 *++p = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
876 return s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
877 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
878 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
879 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
880 update_plugin_config(gchar **config_string, gchar *name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
881 plugin_config_t *pc, gboolean save) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
882 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
883 plugin_config_t default_pc = DEFAULT_OP_CONFIG; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
884 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
885 gchar *buffer = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
886 gchar out[1024]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
887 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
888 gboolean plugin_found = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
889 gchar *plugin, *next_plugin; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
890 gchar *args; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
891 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
892 if(pc && !save) *pc = default_pc; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
893 if(!config_string || !*config_string || !name || !pc) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
894 DEBUG(("[crossfade] update_plugin_config: missing arg!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
895 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
896 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
897 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
898 buffer = g_strdup(*config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
899 out[0] = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
900 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
901 for(plugin = buffer; plugin; plugin = next_plugin) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
902 if((next_plugin = strchr(plugin, ';'))) *next_plugin++ = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
903 if((args = strchr(plugin, '='))) *args++ = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
904 plugin = strip(plugin); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
905 if(!*plugin || !args || !*args) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
906 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
907 if(save) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
908 if(0 == strcmp(plugin, name)) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
909 if(*out) strcat(out, "; "); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
910 strcat(out, plugin); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
911 strcat(out, "="); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
912 strcat(out, args); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
913 continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
914 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
915 else if(strcmp(plugin, name)) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
916 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
917 args = strip(args); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
918 sscanf(args, "%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
919 &pc->throttle_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
920 &pc->max_write_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
921 &pc->max_write_len, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
922 &pc->force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
923 pc->max_write_len &= -4; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
924 plugin_found = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
925 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
926 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
927 if(save) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
928 /* only save if settings differ from defaults */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
929 if(( pc->throttle_enable != default_pc.throttle_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
930 ||(pc->max_write_enable != default_pc.max_write_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
931 ||(pc->max_write_len != default_pc.max_write_len) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
932 ||(pc->force_reopen != default_pc.force_reopen)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
933 if(*out) strcat(out, "; "); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
934 sprintf(out + strlen(out), "%s=%d,%d,%d,%d", name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
935 pc->throttle_enable ? 1 : 0, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
936 pc->max_write_enable ? 1 : 0, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
937 pc->max_write_len, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
938 pc->force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
939 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
940 if(*config_string) g_free(*config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
941 *config_string = g_strdup(out); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
942 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
943 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
944 g_free(buffer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
945 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
946 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
947 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
948 config_plugin_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
949 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
950 static gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
951 scan_plugins(GtkWidget *option_menu, gchar *selected) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
952 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
953 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
954 GList *list = g_list_first(get_output_list()); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
955 gint index = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
956 gint sel_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
957 gint def_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
958 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
959 /* sanity check */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
960 if(selected == NULL) selected = ""; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
961 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
962 /* parse module list */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
963 while(list) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
964 OutputPlugin *op = (OutputPlugin *)list->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
965 GtkWidget *item = gtk_menu_item_new_with_label(op->description); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
966 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
967 if(op == get_crossfade_oplugin_info()) /* disable selecting ourselves */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
968 gtk_widget_set_sensitive(item, FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
969 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
970 if(def_index == -1) def_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
971 if(selected && !strcmp(g_basename(op->filename), selected)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
972 sel_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
973 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
974 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
975 /* create menu item */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
976 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
977 GTK_SIGNAL_FUNC(config_plugin_cb), (gpointer)index++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
978 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
979 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
980 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
981 /* advance to next module */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
982 list = g_list_next(list); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
983 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
984 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
985 /* attach menu */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
986 gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
987 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
988 if(sel_index == -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
989 DEBUG(("[crossfade] scan_plugins: plugin not found (\"%s\")\n", selected)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
990 return def_index; /* use default (first entry) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
991 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
992 return sel_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
993 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
994 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
995 /*-- plugin output callbacks ------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
996 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
997 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
998 config_plugin_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
999 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1000 OutputPlugin *op = g_list_nth_data(get_output_list(), index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1001 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1002 /* get plugin options from gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1003 op_config.throttle_enable = GET_TOGGLE("op_throttle_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1004 op_config.max_write_enable = GET_TOGGLE("op_maxblock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1005 op_config.max_write_len = GET_SPIN ("op_maxblock_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1006 op_config.force_reopen = GET_TOGGLE("op_forcereopen_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1007 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1008 /* config -> string */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1009 xfade_save_plugin_config(&cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1010 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1011 /* select new plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1012 op_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1013 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1014 /* get new plugin's name */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1015 if(cfg->op_name) g_free(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1016 cfg->op_name = (op && op->filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1017 ? g_strdup(g_basename(op->filename)) : NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1018 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1019 /* string -> config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1020 xfade_load_plugin_config(cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1021 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1022 /* update gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1023 SET_SENSITIVE("op_configure_button", op && (op->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1024 SET_SENSITIVE("op_about_button", op && (op->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1025 SET_TOGGLE ("op_throttle_check", op_config.throttle_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1026 SET_TOGGLE ("op_maxblock_check", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1027 SET_SPIN ("op_maxblock_spin", op_config.max_write_len); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1028 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1029 SET_TOGGLE ("op_forcereopen_check", op_config.force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1030 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1031 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1032 void on_output_plugin_configure_button_clicked (GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1033 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1034 OutputPlugin *op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1035 if((op == NULL) || (op->configure == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1036 op->configure(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1037 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1038 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1039 void on_output_plugin_about_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1040 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1041 OutputPlugin *op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1042 if((op == NULL) || (op->about == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1043 op->about(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1044 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1045 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1046 void on_op_throttle_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1047 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1048 op_config.throttle_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1049 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1050 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1051 void on_op_maxblock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1052 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1053 op_config.max_write_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1054 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1055 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1056 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1057 void on_op_maxblock_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1058 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1059 op_config.max_write_len = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1060 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1061 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1062 void on_op_forcereopen_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1063 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1064 op_config.max_write_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1065 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1066 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1067 /*** effects *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1068 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1069 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1070 config_effect_plugin_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1071 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1072 static gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1073 scan_effect_plugins(GtkWidget *option_menu, gchar *selected) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1074 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1075 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1076 GList *list = g_list_first(get_effect_list()); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1077 gint index = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1078 gint sel_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1079 gint def_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1080 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1081 /* sanity check */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1082 if(selected == NULL) selected = ""; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1083 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1084 /* parse module list */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1085 while(list) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1086 EffectPlugin *ep = (EffectPlugin *)list->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1087 GtkWidget *item = gtk_menu_item_new_with_label(ep->description); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1088 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1089 if(def_index == -1) def_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1090 if(selected && !strcmp(g_basename(ep->filename), selected)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1091 sel_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1092 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1093 /* create menu item */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1094 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1095 GTK_SIGNAL_FUNC(config_effect_plugin_cb), (gpointer)index++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1096 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1097 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1098 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1099 /* advance to next module */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1100 list = g_list_next(list); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1101 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1102 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1103 /* attach menu */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1104 gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1105 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1106 if(sel_index == -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1107 DEBUG(("[crossfade] scan_effect_plugins: plugin not found (\"%s\")\n", selected)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1108 return def_index; /* use default (first entry) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1109 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1110 return sel_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1111 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1112 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1113 /*-- plugin output callbacks ------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1114 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1115 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1116 config_effect_plugin_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1117 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1118 EffectPlugin *ep = g_list_nth_data(get_effect_list(), index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1119 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1120 /* select new plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1121 ep_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1122 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1123 /* get new plugin's name */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1124 if(cfg->ep_name) g_free(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1125 cfg->ep_name = (ep && ep->filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1126 ? g_strdup(g_basename(ep->filename)) : NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1127 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1128 /* update gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1129 SET_SENSITIVE("ep_configure_button", ep && (ep->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1130 SET_SENSITIVE("ep_about_button", ep && (ep->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1131 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1132 /* 0.3.5: apply effect config immediatelly */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1133 if(config->ep_name) g_free(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1134 config->ep_name = g_strdup(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1135 xfade_realize_ep_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1136 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1137 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1138 void on_ep_configure_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1139 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1140 EffectPlugin *ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1141 if((ep == NULL) || (ep->configure == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1142 ep->configure(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1143 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1144 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1145 void on_ep_about_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1146 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1147 EffectPlugin *ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1148 if((ep == NULL) || (ep->about == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1149 ep->about(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1150 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1151 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1152 void on_ep_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1153 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1154 /* 0.3.5: apply effect config immediatelly */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1155 config->ep_enable = cfg->ep_enable = GET_TOGGLE("ep_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1156 xfade_realize_ep_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1157 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1158 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1159 /*-- volume normalizer ------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1160 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1161 void check_effects_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1162 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1163 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1164 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1165 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1166 SET_SENSITIVE("volnorm_target_spin", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1167 SET_SENSITIVE("volnorm_target_label", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1168 SET_SENSITIVE("volnorm_quantaudio_check", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1169 SET_SENSITIVE("volnorm_target_spin", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1170 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1171 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1172 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1173 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1174 void on_volnorm_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1175 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1176 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1177 cfg->volnorm_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1178 check_effects_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1179 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1180 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1181 /*** crossfader **************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1182 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1183 static void xf_config_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1184 static void xf_type_cb (GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1185 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1186 /* crude hack to keep track of menu items */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1187 static gint xf_config_index_map[MAX_FADE_CONFIGS]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1188 static gint xf_type_index_map [MAX_FADE_TYPES]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1189 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1190 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1191 create_crossfader_config_menu() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1192 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1193 GtkWidget *optionmenu, *menu; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1194 gint i, *imap; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1195 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1196 if((optionmenu = lookup_widget(config_win, "xf_config_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1197 for(i=0; i<MAX_FADE_CONFIGS; i++) xf_config_index_map[i] = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1198 imap = xf_config_index_map; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1199 menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1200 add_menu_item(menu, "Start of playback", xf_config_cb, FADE_CONFIG_START, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1201 add_menu_item(menu, "Automatic songchange", xf_config_cb, FADE_CONFIG_XFADE, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1202 #if 0 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1203 /* this should be FADE_TYPE_NONE all the time, anyway, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1204 so no need to make it configureable by the user */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1205 add_menu_item(menu, "Automatic (gapless)", xf_config_cb, FADE_CONFIG_ALBUM, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1206 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1207 add_menu_item(menu, "Manual songchange", xf_config_cb, FADE_CONFIG_MANUAL, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1208 add_menu_item(menu, "Manual stop", xf_config_cb, FADE_CONFIG_STOP, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1209 add_menu_item(menu, "End of playlist", xf_config_cb, FADE_CONFIG_EOP, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1210 add_menu_item(menu, "Seeking", xf_config_cb, FADE_CONFIG_SEEK, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1211 add_menu_item(menu, "Pause", xf_config_cb, FADE_CONFIG_PAUSE, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1212 gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1213 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1214 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1215 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1216 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1217 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1218 create_crossfader_type_menu() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1219 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1220 GtkWidget *optionmenu, *menu; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1221 gint i, *imap; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1222 guint32 mask; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1223 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1224 if((optionmenu = lookup_widget(config_win, "xf_type_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1225 for(i=0; i<MAX_FADE_TYPES; i++) xf_type_index_map[i] = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1226 imap = xf_type_index_map; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1227 menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1228 mask = cfg->fc[cfg->xf_index].type_mask; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1229 if(mask & (1 << FADE_TYPE_REOPEN)) add_menu_item(menu, "Reopen output device", xf_type_cb, FADE_TYPE_REOPEN, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1230 if(mask & (1 << FADE_TYPE_FLUSH)) add_menu_item(menu, "Flush output device", xf_type_cb, FADE_TYPE_FLUSH, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1231 if(mask & (1 << FADE_TYPE_NONE)) add_menu_item(menu, "None (gapless/off)", xf_type_cb, FADE_TYPE_NONE, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1232 if(mask & (1 << FADE_TYPE_PAUSE)) add_menu_item(menu, "Pause", xf_type_cb, FADE_TYPE_PAUSE, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1233 if(mask & (1 << FADE_TYPE_SIMPLE_XF)) add_menu_item(menu, "Simple crossfade", xf_type_cb, FADE_TYPE_SIMPLE_XF, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1234 if(mask & (1 << FADE_TYPE_ADVANCED_XF)) add_menu_item(menu, "Advanced crossfade", xf_type_cb, FADE_TYPE_ADVANCED_XF, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1235 if(mask & (1 << FADE_TYPE_FADEIN)) add_menu_item(menu, "Fadein", xf_type_cb, FADE_TYPE_FADEIN, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1236 if(mask & (1 << FADE_TYPE_FADEOUT)) add_menu_item(menu, "Fadeout", xf_type_cb, FADE_TYPE_FADEOUT, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1237 if(mask & (1 << FADE_TYPE_PAUSE_NONE)) add_menu_item(menu, "None", xf_type_cb, FADE_TYPE_PAUSE_NONE, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1238 if(mask & (1 << FADE_TYPE_PAUSE_ADV)) add_menu_item(menu, "Fadeout/Fadein", xf_type_cb, FADE_TYPE_PAUSE_ADV, &imap); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1239 gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1240 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1241 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1242 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1243 #define NONE 0x00000000L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1244 #define XF_CONFIG 0x00000001L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1245 #define XF_TYPE 0x00000002L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1246 #define XF_MIX_SIZE 0x00000004L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1247 #define XF_FADEOUT 0x00000008L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1248 #define XF_OFFSET 0x00000010L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1249 #define XF_FADEIN 0x00000020L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1250 #define XF_PAGE 0x00000040L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1251 #define XF_FLUSH 0x00000080L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1252 #define ANY 0xffffffffL |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1253 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1254 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1255 check_crossfader_dependencies(guint32 mask) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1256 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1257 fade_config_t *fc = &cfg->fc[cfg->xf_index]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1258 gint i; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1259 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1260 /* HACK: avoid endless recursion */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1261 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1262 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1263 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1264 if(mask & XF_FLUSH) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1265 SET_TOGGLE ("xftfp_enable_check", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1266 SET_SENSITIVE("xftfp_length_label", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1267 SET_SENSITIVE("xftfp_length_spin", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1268 SET_TOGGLE ("xftffi_enable_check", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1269 SET_SENSITIVE("xftffi_length_label", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1270 SET_SENSITIVE("xftffi_length_spin", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1271 SET_SENSITIVE("xftffi_volume_label", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1272 SET_SENSITIVE("xftffi_volume_spin", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1273 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1274 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1275 if(mask & XF_MIX_SIZE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1276 SET_TOGGLE ("xf_autobuf_check", cfg->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1277 SET_SENSITIVE("xf_buffer_spin", !cfg->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1278 SET_SPIN ("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1279 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1280 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1281 if(mask & XF_CONFIG) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1282 for(i=0; i<MAX_FADE_CONFIGS && (xf_config_index_map[i] != cfg->xf_index); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1283 if(i == MAX_FADE_CONFIGS) i=0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1284 SET_HISTORY("xf_config_optionmenu", i); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1285 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1286 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1287 if(mask & XF_TYPE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1288 create_crossfader_type_menu(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1289 for(i=0; i<MAX_FADE_TYPES && (xf_type_index_map[i] != fc->type); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1290 if(i == MAX_FADE_TYPES) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1291 fc->type = FADE_TYPE_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1292 for(i=0; i<MAX_FADE_TYPES && (xf_type_index_map[i] != fc->type); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1293 if(i == MAX_FADE_CONFIGS) i=0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1294 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1295 SET_HISTORY("xf_type_optionmenu", i); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1296 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1297 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1298 if(mask & XF_PAGE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1299 SET_PAGE("xf_type_notebook", fc->type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1300 SET_SPIN("pause_length_spin", fc->pause_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1301 SET_SPIN("simple_length_spin", fc->simple_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1302 if(fc->config == FADE_CONFIG_SEEK) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1303 HIDE("xftf_pause_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1304 HIDE("xftf_fadein_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1305 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1306 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1307 SHOW("xftf_pause_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1308 SHOW("xftf_fadein_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1309 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1310 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1311 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1312 if(mask & XF_FADEOUT) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1313 SET_TOGGLE ("fadeout_enable_check", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1314 SET_SENSITIVE("fadeout_length_label", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1315 SET_SENSITIVE("fadeout_length_spin", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1316 SET_SPIN ("fadeout_length_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1317 SET_SENSITIVE("fadeout_volume_label", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1318 SET_SENSITIVE("fadeout_volume_spin", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1319 SET_SPIN ("fadeout_volume_spin", fc->out_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1320 SET_SPIN ("xftfo_length_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1321 SET_SPIN ("xftfo_volume_spin", fc->out_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1322 SET_SPIN ("xftfoi_fadeout_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1323 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1324 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1325 if(mask & XF_FADEIN) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1326 SET_TOGGLE ("fadein_lock_check", fc->in_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1327 SET_SENSITIVE("fadein_enable_check", !fc->in_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1328 SET_TOGGLE ("fadein_enable_check", fc->in_locked ? fc->out_enable : fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1329 SET_SENSITIVE("fadein_length_label", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1330 SET_SENSITIVE("fadein_length_spin", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1331 SET_SPIN ("fadein_length_spin", fc->in_locked ? fc->out_len_ms : fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1332 SET_SENSITIVE("fadein_volume_label", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1333 SET_SENSITIVE("fadein_volume_spin", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1334 SET_SPIN ("fadein_volume_spin", fc->in_locked ? fc->out_volume : fc->in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1335 SET_SPIN ("xftfi_length_spin", fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1336 SET_SPIN ("xftfi_volume_spin", fc->in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1337 SET_SPIN ("xftfoi_fadein_spin", fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1338 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1339 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1340 if(mask & XF_OFFSET) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1341 if(fc->out_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1342 SET_SENSITIVE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1343 if(!fc->in_locked && fc->in_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1344 SET_SENSITIVE("xfofs_lockin_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1345 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1346 switch(fc->ofs_type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1347 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1348 if(!fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1349 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1350 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1351 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1352 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1353 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1354 if(!(!fc->in_locked && fc->in_enable)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1355 if((fc->in_locked && fc->out_enable)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1356 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1357 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1358 } else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1359 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1360 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1361 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1362 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1363 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1364 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1365 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1366 switch(fc->ofs_type_wanted) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1367 case FC_OFFSET_NONE: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1368 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1369 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1370 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1371 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1372 if(fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1373 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1374 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1375 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1376 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1377 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1378 if(!fc->in_locked && fc->in_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1379 SET_TOGGLE("xfofs_lockin_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1380 fc->ofs_type = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1381 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1382 else if(fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1383 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1384 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1385 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1386 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1387 case FC_OFFSET_CUSTOM: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1388 SET_TOGGLE("xfofs_custom_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1389 fc->ofs_type = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1390 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1391 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1392 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1393 if(!fc->out_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1394 SET_SENSITIVE("xfofs_lockout_radiobutton", FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1395 if(!(!fc->in_locked && fc->in_enable)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1396 SET_SENSITIVE("xfofs_lockin_radiobutton", FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1397 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1398 SET_SENSITIVE("xfofs_custom_spin", fc->ofs_type == FC_OFFSET_CUSTOM); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1399 SET_SPIN ("xfofs_custom_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1400 SET_SPIN ("xftfo_silence_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1401 SET_SPIN ("xftfoi_silence_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1402 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1403 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1404 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1405 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1406 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1407 /*-- crossfader callbacks ---------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1408 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1409 void on_xf_buffer_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1410 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1411 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1412 cfg->mix_size_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1413 check_crossfader_dependencies(NONE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1414 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1415 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1416 void on_xf_autobuf_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1417 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1418 cfg->mix_size_auto = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1419 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1420 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1421 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1422 /* - config/type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1423 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1424 void xf_config_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1425 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1426 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1427 cfg->xf_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1428 check_crossfader_dependencies(ANY & ~XF_CONFIG); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1429 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1430 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1431 void xf_type_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1432 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1433 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1434 cfg->fc[cfg->xf_index].type = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1435 check_crossfader_dependencies(ANY & ~XF_CONFIG); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1436 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1437 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1438 /* - flush - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1439 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1440 void on_xftfp_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1441 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1442 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1443 cfg->fc[cfg->xf_index].flush_pause_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1444 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1445 check_crossfader_dependencies(XF_FLUSH|XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1446 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1447 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1448 void on_xftfp_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1449 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1450 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1451 cfg->fc[cfg->xf_index].flush_pause_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1452 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1453 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1454 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1455 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1456 void on_xftffi_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1457 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1458 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1459 cfg->fc[cfg->xf_index].flush_in_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1460 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1461 check_crossfader_dependencies(XF_FLUSH|XF_OFFSET|XF_FADEOUT|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1462 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1463 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1464 void on_xftffi_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1465 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1466 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1467 cfg->fc[cfg->xf_index].flush_in_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1468 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1469 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1470 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1471 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1472 void on_xftffi_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1473 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1474 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1475 cfg->fc[cfg->xf_index].flush_in_volume |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1476 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1477 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1478 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1479 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1480 /* - pause - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1481 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1482 void on_pause_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1483 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1484 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1485 cfg->fc[cfg->xf_index].pause_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1486 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1487 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1488 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1489 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1490 /* - simple - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1491 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1492 void on_simple_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1493 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1494 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1495 cfg->fc[cfg->xf_index].simple_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1496 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1497 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1498 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1499 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1500 /* - crossfade-fadeout - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1501 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1502 void on_fadeout_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1503 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1504 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1505 cfg->fc[cfg->xf_index].out_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1506 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1507 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET|XF_FADEOUT|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1508 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1509 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1510 void on_fadeout_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1511 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1512 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1513 cfg->fc[cfg->xf_index].out_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1514 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1515 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1516 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1517 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1518 void on_fadeout_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1519 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1520 cfg->fc[cfg->xf_index].out_volume |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1521 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1522 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1523 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1524 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1525 /* - crossfade-offset - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1526 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1527 void on_xfofs_none_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1528 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1529 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1530 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1531 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1532 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1533 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1534 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1535 void on_xfofs_none_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1536 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1537 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1538 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1539 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1540 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1541 void on_xfofs_lockout_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1542 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1543 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1544 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1545 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1546 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1547 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1548 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1549 void on_xfofs_lockout_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1550 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1551 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1552 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1553 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1554 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1555 void on_xfofs_lockin_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1556 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1557 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1558 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1559 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1560 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1561 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1562 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1563 void on_xfofs_lockin_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1564 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1565 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1566 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1567 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1568 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1569 void on_xfofs_custom_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1570 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1571 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1572 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1573 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1574 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1575 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1576 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1577 void on_xfofs_custom_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1578 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1579 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1580 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1581 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1582 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1583 void on_xfofs_custom_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1584 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1585 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1586 cfg->fc[cfg->xf_index].ofs_custom_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1587 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1588 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1589 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1590 /* - crossfade-fadein - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1591 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1592 void on_fadein_lock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1593 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1594 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1595 cfg->fc[cfg->xf_index].in_locked = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1596 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1597 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1598 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1599 void on_fadein_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1600 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1601 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1602 cfg->fc[cfg->xf_index].in_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1603 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1604 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1605 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1606 void on_fadein_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1607 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1608 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1609 cfg->fc[cfg->xf_index].in_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1610 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1611 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1612 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1613 void on_fadein_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1614 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1615 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1616 cfg->fc[cfg->xf_index].in_volume = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1617 check_crossfader_dependencies(NONE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1618 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1619 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1620 /*-- fadein -----------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1621 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1622 /* signal set to on_fadein_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1623 /* signal set to on_fadein_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1624 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1625 /*-- fadeout ----------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1626 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1627 /* signal set to on_fadeout_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1628 /* signal set to on_fadeout_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1629 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1630 /*-- fadeout/fadein ---------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1631 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1632 /* signal set to on_fadeout_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1633 /* signal set to on_xfofs_custom_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1634 /* signal set to on_fadeout_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1635 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1636 /*** gap killer **************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1637 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1638 void check_gapkiller_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1639 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1640 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1641 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1642 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1643 SET_SENSITIVE("lgap_length_spin", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1644 SET_SENSITIVE("lgap_level_spin", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1645 SET_SENSITIVE("tgap_enable_check", !cfg->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1646 SET_SENSITIVE("tgap_length_spin", !cfg->gap_trail_locked && cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1647 SET_SENSITIVE("tgap_level_spin", !cfg->gap_trail_locked && cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1648 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1649 if(cfg->gap_trail_locked) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1650 SET_TOGGLE("tgap_enable_check", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1651 SET_SPIN ("tgap_length_spin", cfg->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1652 SET_SPIN ("tgap_level_spin", cfg->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1653 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1654 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1655 SET_TOGGLE("tgap_enable_check", cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1656 SET_SPIN ("tgap_length_spin", cfg->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1657 SET_SPIN ("tgap_level_spin", cfg->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1658 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1659 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1660 if(cfg->mix_size_auto) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1661 SET_SPIN("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1662 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1663 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1664 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1665 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1666 /*-- gapkiller callbacks ----------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1667 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1668 void on_lgap_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1669 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1670 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1671 cfg->gap_lead_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1672 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1673 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1674 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1675 void on_lgap_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1676 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1677 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1678 cfg->gap_lead_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1679 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1680 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1681 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1682 void on_lgap_level_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1683 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1684 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1685 cfg->gap_lead_level = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1686 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1687 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1688 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1689 void on_tgap_lock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1690 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1691 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1692 cfg->gap_trail_locked = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1693 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1694 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1695 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1696 void on_tgap_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1697 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1698 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1699 cfg->gap_trail_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1700 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1701 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1702 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1703 void on_tgap_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1704 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1705 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1706 cfg->gap_trail_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1707 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1708 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1709 void on_tgap_level_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1710 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1711 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1712 cfg->gap_trail_level = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1713 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1714 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1715 /*** misc ********************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1716 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1717 void check_misc_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1718 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1719 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1720 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1721 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1722 if(cfg->mix_size_auto) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1723 SET_SPIN("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1724 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1725 SET_SENSITIVE("moth_opmaxused_spin", cfg->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1726 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1727 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1728 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1729 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1730 /*-- misc callbacks ---------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1731 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1732 void on_config_mixopt_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1733 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1734 SET_SENSITIVE("mixopt_reverse_check", gtk_toggle_button_get_active(togglebutton)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1735 SET_SENSITIVE("mixopt_software_check", gtk_toggle_button_get_active(togglebutton)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1736 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1737 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1738 void on_moth_songchange_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1739 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1740 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1741 cfg->songchange_timeout = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1742 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1743 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1744 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1745 void on_moth_opmaxused_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1746 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1747 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1748 cfg->enable_op_max_used = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1749 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1750 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1751 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1752 /*** presets *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1753 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1754 void on_presets_list_click_column(GtkCList *clist, gint column, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1755 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1756 DEBUG(("*** column=%d\n", column)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1757 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1758 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1759 /*** main config *************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1760 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1761 void on_config_apply_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1762 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1763 GtkWidget *widget; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1764 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1765 /* get current notebook page */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1766 if((widget = lookup_widget(config_win, "config_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1767 cfg->page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widget)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1768 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1769 /* output method */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1770 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1771 /* sample rate */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1772 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1773 /* output method: builtin OSS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1774 if((widget = lookup_widget(config_win, "output_oss_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1775 cfg->oss_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widget)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1776 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1777 if((widget = lookup_widget(config_win, "oss_adevice_alt_entry"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1778 if(cfg->oss_alt_audio_device) g_free(cfg->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1779 cfg->oss_alt_audio_device = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1780 g_strstrip(cfg->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1781 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1782 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1783 if((widget = lookup_widget(config_win, "oss_mdevice_alt_entry"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1784 if(cfg->oss_alt_mixer_device) g_free(cfg->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1785 cfg->oss_alt_mixer_device = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1786 g_strstrip(cfg->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1787 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1788 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1789 cfg->oss_buffer_size_ms = GET_SPIN ("ossbuf_buffer_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1790 cfg->oss_preload_size_ms = GET_SPIN ("ossbuf_preload_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1791 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1792 cfg->oss_fragments = GET_SPIN ("osshwb_fragments_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1793 cfg->oss_fragment_size = GET_SPIN ("osshwb_fragsize_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1794 cfg->oss_maxbuf_enable = GET_TOGGLE("osshwb_maxbuf_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1795 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1796 cfg->oss_mixer_use_master = GET_TOGGLE("ossmixer_pcm_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1797 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1798 /* output method: plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1799 op_config.throttle_enable = GET_TOGGLE("op_throttle_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1800 op_config.max_write_enable = GET_TOGGLE("op_maxblock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1801 op_config.max_write_len = GET_SPIN ("op_maxblock_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1802 op_config.force_reopen = GET_TOGGLE("op_forcereopen_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1803 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1804 xfade_save_plugin_config(&cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1805 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1806 /* output method: none: */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1807 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1808 /* effects: pre-mixing effect plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1809 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1810 /* effects: volume normalizer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1811 cfg->volnorm_target = GET_SPIN ("volnorm_target_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1812 cfg->volnorm_use_qa = GET_TOGGLE("volnorm_quantaudio_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1813 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1814 /* crossfader */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1815 cfg->mix_size_auto = GET_TOGGLE("xf_autobuf_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1816 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1817 /* gap killer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1818 cfg->gap_lead_enable = GET_TOGGLE("lgap_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1819 cfg->gap_lead_len_ms = GET_SPIN ("lgap_length_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1820 cfg->gap_lead_level = GET_SPIN ("lgap_level_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1821 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1822 cfg->gap_trail_locked = GET_TOGGLE("tgap_lock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1823 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1824 cfg->gap_crossing = GET_TOGGLE("gadv_crossing_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1825 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1826 /* misc */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1827 cfg->enable_debug = GET_TOGGLE("debug_stderr_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1828 cfg->enable_monitor = GET_TOGGLE("debug_monitor_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1829 cfg->enable_mixer = GET_TOGGLE("mixopt_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1830 cfg->mixer_reverse = GET_TOGGLE("mixopt_reverse_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1831 cfg->mixer_software = GET_TOGGLE("mixopt_software_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1832 cfg->preload_size_ms = GET_SPIN ("moth_preload_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1833 cfg->album_detection = GET_TOGGLE("noxf_album_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1834 cfg->no_xfade_if_same_file = GET_TOGGLE("noxf_samefile_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1835 cfg->enable_http_workaround = GET_TOGGLE("moth_httpworkaround_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1836 cfg->op_max_used_ms = GET_SPIN ("moth_opmaxused_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1837 cfg->output_keep_opened = GET_TOGGLE("moth_outputkeepopened_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1838 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1839 /* presets */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1840 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1841 /* lock buffer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1842 g_static_mutex_lock(&buffer_mutex); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1843 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1844 /* free existing strings */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1845 if(config->oss_alt_audio_device) g_free(config->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1846 if(config->oss_alt_mixer_device) g_free(config->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1847 if(config->op_config_string) g_free(config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1848 if(config->op_name) g_free(config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1849 if(config->ep_name) g_free(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1850 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1851 /* copy current settings (dupping the strings) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1852 *config = *cfg; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1853 config->oss_alt_audio_device = g_strdup(cfg->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1854 config->oss_alt_mixer_device = g_strdup(cfg->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1855 config->op_config_string = g_strdup(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1856 config->op_name = g_strdup(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1857 config->ep_name = g_strdup(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1858 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1859 /* tell the engine that the config has changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1860 xfade_realize_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1861 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1862 /* unlock buffer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1863 g_static_mutex_unlock(&buffer_mutex); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1864 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1865 /* save configuration */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1866 xfade_save_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1867 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1868 /* show/hide monitor win depending on config->enable_monitor */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1869 xfade_check_monitor_win(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1870 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1871 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1872 void on_config_ok_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1873 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1874 /* apply and save config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1875 on_config_apply_clicked(button, user_data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1876 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1877 /* close and destroy window */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1878 gtk_widget_destroy(config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1879 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1880 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1881 void xfade_configure() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1882 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1883 GtkWidget *widget; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1884 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1885 if(!config_win) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1886 /* create */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1887 if(!(config_win = create_config_win())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1888 DEBUG(("[crossfade] plugin_configure: error creating window!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1889 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1890 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1891 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1892 /* update config_win when window is destroyed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1893 gtk_signal_connect(GTK_OBJECT(config_win), "destroy", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1894 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1895 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1896 /* free any strings that might be left in our local copy of the config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1897 if(cfg->oss_alt_audio_device) g_free(cfg->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1898 if(cfg->oss_alt_mixer_device) g_free(cfg->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1899 if(cfg->op_config_string) g_free(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1900 if(cfg->op_name) g_free(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1901 if(cfg->ep_name) g_free(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1902 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1903 /* copy current settings (dupping the strings) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1904 *cfg = *config; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1905 cfg->oss_alt_audio_device = g_strdup(config->oss_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1906 cfg->oss_alt_mixer_device = g_strdup(config->oss_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1907 cfg->op_config_string = g_strdup(config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1908 cfg->op_name = g_strdup(config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1909 cfg->ep_name = g_strdup(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1910 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1911 /* go to remembered notebook page */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1912 if((widget = lookup_widget(config_win, "config_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1913 gtk_notebook_set_page(GTK_NOTEBOOK(widget), config->page); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1914 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1915 /* output: method */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1916 #ifdef HAVE_OSS |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1917 SET_SENSITIVE("output_oss_radio", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1918 #else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1919 SET_SENSITIVE("output_oss_radio", FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1920 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1921 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1922 switch(cfg->output_method) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1923 case OUTPUT_METHOD_BUILTIN_OSS: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1924 widget = lookup_widget(config_win, "output_oss_radio"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1925 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1926 case OUTPUT_METHOD_PLUGIN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1927 widget = lookup_widget(config_win, "output_plugin_radio"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1928 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1929 case OUTPUT_METHOD_BUILTIN_NULL: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1930 widget = lookup_widget(config_win, "output_none_radio"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1931 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1932 default: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1933 widget = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1934 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1935 if(widget) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1936 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1937 if((widget = lookup_widget(config_win, "output_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1938 gtk_notebook_set_page(GTK_NOTEBOOK(widget), cfg->output_method); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1939 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1940 /* output: resampling rate */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1941 if((widget = lookup_widget(config_win, "resampling_rate_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1942 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1943 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1944 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1945 item = gtk_menu_item_new_with_label("44100 Hz"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1946 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(resampling_rate_cb), (gpointer)44100); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1947 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1948 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1949 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1950 item = gtk_menu_item_new_with_label("48000 Hz"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1951 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(resampling_rate_cb), (gpointer)48000); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1952 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1953 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1954 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1955 gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1956 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1957 switch(cfg->output_rate) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1958 default: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1959 DEBUG(("[crossfade] plugin_configure: WARNING: invalid output sample rate (%d)!\n", cfg->output_rate)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1960 DEBUG(("[crossfade] plugin_configure: ... using default of 44100\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1961 cfg->output_rate = 44100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1962 case 44100: gtk_option_menu_set_history(GTK_OPTION_MENU(widget), 0); break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1963 case 48000: gtk_option_menu_set_history(GTK_OPTION_MENU(widget), 1); break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1964 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1965 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1966 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1967 /* output: resampling quality (libsamplerate setting) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1968 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1969 if((widget = lookup_widget(config_win, "resampling_quality_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1970 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1971 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1972 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1973 GtkTooltips *tooltips = (GtkTooltips *)gtk_object_get_data(GTK_OBJECT(config_win), "tooltips"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1974 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1975 int converter_type; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1976 const char *name, *description; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1977 for(converter_type = 0; (name = src_get_name(converter_type)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1978 converter_type++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1979 description = src_get_description(converter_type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1980 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1981 item = gtk_menu_item_new_with_label(name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1982 gtk_tooltips_set_tip(tooltips, item, description, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1983 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1984 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1985 GTK_SIGNAL_FUNC(resampling_quality_cb), (gpointer)converter_type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1986 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1987 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1988 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1989 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1990 gtk_option_menu_set_menu (GTK_OPTION_MENU(widget), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1991 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), cfg->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1992 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1993 #else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1994 HIDE("resampling_quality_hbox"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1995 HIDE("resampling_quality_optionmenu"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1996 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1997 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1998 /* output method: builtin OSS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1999 if((widget = lookup_widget(config_win, "output_oss_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2000 gtk_notebook_set_page(GTK_NOTEBOOK(widget), cfg->oss_page); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2001 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2002 if((widget = lookup_widget(config_win, "oss_adevice_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2003 scan_devices("Audio devices:", widget, config_adevice_cb); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2004 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2005 cfg->oss_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2006 gtk_widget_set_sensitive(widget, !cfg->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2007 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2008 SET_TOGGLE("oss_adevice_alt_check", cfg->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2009 if((widget = lookup_widget(config_win, "oss_adevice_alt_entry"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2010 gtk_entry_set_text(GTK_ENTRY(widget), cfg->oss_alt_audio_device |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2011 ? cfg->oss_alt_audio_device |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2012 : DEFAULT_OSS_ALT_AUDIO_DEVICE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2013 gtk_widget_set_sensitive(widget, cfg->oss_use_alt_audio_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2014 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2015 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2016 if((widget = lookup_widget(config_win, "oss_mdevice_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2017 scan_devices("Mixers:", widget, config_mdevice_cb); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2018 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2019 cfg->oss_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2020 gtk_widget_set_sensitive(widget, !cfg->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2021 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2022 SET_TOGGLE("oss_mdevice_alt_check", cfg->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2023 if((widget = lookup_widget(config_win, "oss_mdevice_alt_entry"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2024 gtk_entry_set_text(GTK_ENTRY(widget), cfg->oss_alt_mixer_device |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2025 ? cfg->oss_alt_mixer_device |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2026 : DEFAULT_OSS_ALT_MIXER_DEVICE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2027 gtk_widget_set_sensitive(widget, cfg->oss_use_alt_mixer_device); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2028 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2029 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2030 SET_SPIN ("ossbuf_buffer_spin", cfg->oss_buffer_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2031 SET_SPIN ("ossbuf_preload_spin", cfg->oss_preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2032 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2033 SET_SPIN ("osshwb_fragments_spin", cfg->oss_fragments); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2034 SET_SPIN ("osshwb_fragsize_spin", cfg->oss_fragment_size); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2035 SET_TOGGLE("osshwb_maxbuf_check", cfg->oss_maxbuf_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2036 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2037 SET_TOGGLE("ossmixer_pcm_check", cfg->oss_mixer_use_master); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2038 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2039 check_oss_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2040 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2041 /* output method: plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2042 xfade_load_plugin_config(cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2043 SET_TOGGLE ("op_throttle_check", op_config.throttle_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2044 SET_TOGGLE ("op_maxblock_check", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2045 SET_SPIN ("op_maxblock_spin", op_config.max_write_len); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2046 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2047 SET_TOGGLE ("op_forcereopen_check", op_config.force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2048 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2049 if((widget = lookup_widget(config_win, "op_plugin_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2050 OutputPlugin *op = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2051 if((op_index = scan_plugins(widget, cfg->op_name)) >= 0) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2052 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), op_index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2053 op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2054 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2055 SET_SENSITIVE("op_configure_button", op && (op->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2056 SET_SENSITIVE("op_about_button", op && (op->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2057 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2058 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2059 /* output method: none */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2060 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2061 /* effects: pre-mixing effect plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2062 if((widget = lookup_widget(config_win, "ep_plugin_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2063 EffectPlugin *ep = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2064 if((ep_index = scan_effect_plugins(widget, cfg->ep_name)) >= 0) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2065 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), ep_index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2066 ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2067 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2068 SET_SENSITIVE("ep_configure_button", ep && (ep->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2069 SET_SENSITIVE("ep_about_button", ep && (ep->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2070 SET_TOGGLE ("ep_enable_check", cfg->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2071 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2072 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2073 /* effects: volume normalizer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2074 SET_TOGGLE("volnorm_enable_check", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2075 SET_TOGGLE("volnorm_quantaudio_check", cfg->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2076 SET_SPIN ("volnorm_target_spin", cfg->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2077 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2078 check_effects_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2079 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2080 /* crossfader */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2081 create_crossfader_config_menu(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2082 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2083 if((cfg->xf_index < 0) || (cfg->xf_index >= MAX_FADE_CONFIGS)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2084 DEBUG(("[crossfade] plugin_configure: crossfade index out of range (%d)!\n", cfg->xf_index)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2085 cfg->xf_index = CLAMP(cfg->xf_index, 0, MAX_FADE_CONFIGS); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2086 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2087 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2088 check_crossfader_dependencies(ANY); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2089 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2090 /* gap killer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2091 SET_TOGGLE ("lgap_enable_check", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2092 SET_SPIN ("lgap_length_spin", cfg->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2093 SET_SPIN ("lgap_level_spin", cfg->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2094 SET_TOGGLE ("tgap_lock_check", cfg->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2095 SET_TOGGLE ("tgap_enable_check", cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2096 SET_SPIN ("tgap_length_spin", cfg->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2097 SET_SPIN ("tgap_level_spin", cfg->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2098 SET_TOGGLE ("gadv_crossing_check", cfg->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2099 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2100 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2101 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2102 /* misc */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2103 SET_TOGGLE("debug_stderr_check", cfg->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2104 SET_TOGGLE("debug_monitor_check", cfg->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2105 SET_TOGGLE("mixopt_enable_check", cfg->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2106 SET_TOGGLE("mixopt_reverse_check", cfg->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2107 SET_TOGGLE("mixopt_software_check", cfg->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2108 SET_SPIN ("moth_songchange_spin", cfg->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2109 SET_SPIN ("moth_preload_spin", cfg->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2110 SET_TOGGLE("noxf_album_check", cfg->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2111 SET_TOGGLE("noxf_samefile_check", cfg->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2112 SET_TOGGLE("moth_httpworkaround_check", cfg->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2113 SET_TOGGLE("moth_opmaxused_check", cfg->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2114 SET_SPIN ("moth_opmaxused_spin", cfg->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2115 SET_TOGGLE("moth_outputkeepopened_check", cfg->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2116 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2117 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2118 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2119 /* presets */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2120 if((set_wgt = lookup_widget(config_win, "presets_list_list"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2121 GList *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2122 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2123 for(item = config->presets; item; item = g_list_next(item)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2124 gchar *name = (gchar *)item->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2125 gchar *text[] = {name, "Default", "No"}; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2126 gtk_clist_append(GTK_CLIST(set_wgt), text); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2127 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2128 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2129 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2130 /* show window near mouse pointer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2131 gtk_window_set_position(GTK_WINDOW(config_win), GTK_WIN_POS_MOUSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2132 gtk_widget_show(config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2133 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2134 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2135 /* bring window to front */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2136 gdk_window_raise(config_win->window); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2137 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2138 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2139 void xfade_about() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2140 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2141 if(!about_win) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2142 gchar *about_text = |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2143 "XMMS Crossfade Plugin "VERSION"\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2144 "Copyright (C) 2000-2004 Peter Eisenlohr <peter@eisenlohr.org>\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2145 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2146 "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2147 "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2148 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2149 "This program is free software; you can redistribute it and/or modify\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2150 "it under the terms of the GNU General Public License as published by\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2151 "the Free Software Foundation; either version 2 of the License, or\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2152 "(at your option) any later version.\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2153 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2154 "This program is distributed in the hope that it will be useful,\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2155 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2156 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2157 "GNU General Public License for more details.\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2158 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2159 "You should have received a copy of the GNU General Public License\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2160 "along with this program; if not, write to the Free Software\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2161 "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2162 "USA."; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2163 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2164 about_win = create_about_win(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2165 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2166 /* update about_win when window is destroyed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2167 gtk_signal_connect(GTK_OBJECT(about_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2168 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2169 /* set about box text (this is done here and not in interface.c because |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2170 of the VERSION #define -- there is no way to do this with GLADE */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2171 if((set_wgt = lookup_widget(about_win, "about_label"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2172 gtk_label_set_text(GTK_LABEL(set_wgt), about_text); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2173 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2174 /* show near mouse pointer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2175 gtk_window_set_position(GTK_WINDOW(about_win), GTK_WIN_POS_MOUSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2176 gtk_widget_show(about_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2177 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2178 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2179 gdk_window_raise(about_win->window); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2180 } |