Gentoo Archives: gentoo-commits

From: "Markus Ullmann (jokey)" <jokey@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-plugins/audacious-g15-spectrum/files: audacious-g15-spectrum-2.5.2-audacious-1.4.patch
Date: Mon, 31 Dec 2007 10:19:26
Message-Id: E1J9Hjs-0003gW-8r@stork.gentoo.org
1 jokey 07/12/31 10:19:20
2
3 Added: audacious-g15-spectrum-2.5.2-audacious-1.4.patch
4 Log:
5 Add audacious-1.4 build patch from bug #203853
6 (Portage version: 2.1.4_rc11)
7
8 Revision Changes Path
9 1.1 media-plugins/audacious-g15-spectrum/files/audacious-g15-spectrum-2.5.2-audacious-1.4.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/audacious-g15-spectrum/files/audacious-g15-spectrum-2.5.2-audacious-1.4.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-plugins/audacious-g15-spectrum/files/audacious-g15-spectrum-2.5.2-audacious-1.4.patch?rev=1.1&content-type=text/plain
13
14 Index: audacious-g15-spectrum-2.5.2-audacious-1.4.patch
15 ===================================================================
16 --- g15daemon-audacious-2.5.2/g15daemon_audacious_spectrum.c 2007-09-15 06:48:10.000000000 -0400
17 +++ g15daemon-audacious-2.5.2-new/g15daemon_audacious_spectrum.c 2007-12-31 00:01:24.000000000 -0500
18 @@ -39,10 +39,9 @@
19
20 #include <audacious/plugin.h>
21 #include <audacious/util.h>
22 -#include <audacious/beepctrl.h>
23 +#include <audacious/auddrct.h>
24 #include <audacious/configdb.h>
25 #include <audacious/playlist.h>
26 -#include <audacious/titlestring.h>
27
28 #include <libg15.h>
29 #include <libg15render.h>
30 @@ -197,23 +196,23 @@
31
32
33 VisPlugin g15analyser_vp = {
34 - NULL,
35 - NULL,
36 - 0,
37 - PLUGIN_NAME " " PLUGIN_VERSION,
38 - 1,
39 - 1,
40 - g15analyser_init, /* init */
41 - g15analyser_cleanup, /* cleanup */
42 - g15analyser_about, /* about */
43 - g15analyser_conf, /* configure */
44 - NULL, /* disable_plugin */
45 - g15analyser_playback_start, /* playback_start */
46 - g15analyser_playback_stop, /* playback_stop */
47 - g15analyser_render_pcm, /* render_pcm */
48 - g15analyser_render_freq /* render_freq */
49 + .description = PLUGIN_NAME " " PLUGIN_VERSION,
50 + .num_pcm_chs_wanted = 1,
51 + .num_freq_chs_wanted = 1,
52 + .init = g15analyser_init, /* init */
53 + .cleanup = g15analyser_cleanup, /* cleanup */
54 + .about = g15analyser_about, /* about */
55 + .configure = g15analyser_conf, /* configure */
56 + .playback_start = g15analyser_playback_start, /* playback_start */
57 + .playback_stop = g15analyser_playback_stop, /* playback_stop */
58 + .render_pcm = g15analyser_render_pcm, /* render_pcm */
59 + .render_freq = g15analyser_render_freq /* render_freq */
60 };
61
62 +VisPlugin *g15_vp[] = { &g15analyser_vp, NULL };
63 +
64 +SIMPLE_VISUAL_PLUGIN(g15, g15_vp);
65 +
66 gint g15analyser_disable(gpointer data){
67 g15analyser_vp.disable_plugin (&g15analyser_vp); /* disable if unusable */
68 return FALSE;
69 @@ -223,6 +222,11 @@
70 return &g15analyser_vp;
71 }
72
73 +int get_main_volume() {
74 + int tmpvol;
75 + audacious_drct_get_main_volume(&tmpvol);
76 + return tmpvol;
77 +}
78
79 void g15spectrum_read_config(void)
80 {
81 @@ -725,52 +729,52 @@
82 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioPlay)) {
83 if(playing) {
84 if (paused) {
85 - xmms_remote_play(g15analyser_vp.xmms_session);
86 + audacious_drct_play();
87 paused = 0;
88 } else {
89 - xmms_remote_pause(g15analyser_vp.xmms_session);
90 + audacious_drct_pause();
91 paused = 1;
92 }
93 } else
94 - xmms_remote_play(g15analyser_vp.xmms_session);
95 + audacious_drct_play();
96 }
97
98 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioStop))
99 - xmms_remote_stop(g15analyser_vp.xmms_session);
100 + audacious_drct_stop();
101
102 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioLowerVolume)){
103 - volume = xmms_remote_get_main_volume(g15analyser_vp.xmms_session);
104 + volume = get_main_volume();
105 if(volume<1)
106 volume=1;
107 - xmms_remote_set_main_volume(g15analyser_vp.xmms_session, --volume);
108 + audacious_drct_set_main_volume(--volume);
109 }
110
111 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioRaiseVolume)){
112 - volume = xmms_remote_get_main_volume(g15analyser_vp.xmms_session);
113 + volume = get_main_volume();
114 if(volume>99)
115 volume=99;
116 - xmms_remote_set_main_volume(g15analyser_vp.xmms_session, ++volume);
117 + audacious_drct_set_main_volume(++volume);
118 }
119
120 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioMute)){
121 - if(xmms_remote_get_main_volume(g15analyser_vp.xmms_session)!=0){
122 - lastvolume = xmms_remote_get_main_volume(g15analyser_vp.xmms_session);
123 + if(get_main_volume()!=0){
124 + volume = get_main_volume();
125 volume = 0;
126 }
127 else {
128 volume = lastvolume;
129 }
130
131 - xmms_remote_set_main_volume(g15analyser_vp.xmms_session, volume);
132 + audacious_drct_set_main_volume(volume);
133 }
134
135 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioNext))
136 if (playing)
137 - xmms_remote_playlist_next(g15analyser_vp.xmms_session);
138 + audacious_drct_playlist_next();
139
140 if(event.xkey.keycode==XKeysymToKeycode(dpy, XF86XK_AudioPrev))
141 if (playing)
142 - xmms_remote_playlist_prev(g15analyser_vp.xmms_session);
143 + audacious_drct_playlist_prev();
144
145 }
146 return TRUE;
147 @@ -790,11 +794,11 @@
148 pthread_mutex_lock (&g15buf_mutex);
149 g15r_clearScreen (canvas, G15_COLOR_WHITE);
150
151 - if (xmms_remote_get_playlist_length(g15analyser_vp.xmms_session) > 0)
152 + if (audacious_drct_get_playlist_length() > 0)
153 {
154 - playlist_pos = xmms_remote_get_playlist_pos(g15analyser_vp.xmms_session);
155 + playlist_pos = audacious_drct_get_playlist_pos();
156
157 - title = xmms_remote_get_playlist_title(g15analyser_vp.xmms_session, playlist_pos);
158 + title = audacious_drct_get_playlist_title(playlist_pos);
159 if(title!=NULL && show_title){
160 if (rownum != 1) {
161 /*
162 @@ -891,8 +895,8 @@
163 }
164 }
165 if (show_pbar){
166 - int output_time = xmms_remote_get_output_time(g15analyser_vp.xmms_session)/1000;
167 - int playlist_time = xmms_remote_get_playlist_time(g15analyser_vp.xmms_session,playlist_pos)/1000;
168 + int output_time = audacious_drct_get_output_time()/1000;
169 + int playlist_time = audacious_drct_get_playlist_time(playlist_pos)/1000;
170 /* bugfix: Sometimes xmms don't get the output time */
171 if (playlist_time == 0){
172 playlist_time = 1000;
173 @@ -974,13 +978,13 @@
174 else
175 g15r_renderString (canvas, (unsigned char *)"Playlist Empty", 0, G15_TEXT_LARGE, 24, 16);
176
177 - if(lastvolume!=xmms_remote_get_main_volume(g15analyser_vp.xmms_session) || vol_timeout>=0) {
178 - if(lastvolume!=xmms_remote_get_main_volume(g15analyser_vp.xmms_session))
179 + if(lastvolume!=get_main_volume() || vol_timeout>=0) {
180 + if(lastvolume!=get_main_volume())
181 vol_timeout=10;
182 else
183 vol_timeout--;
184 /* render volume */
185 - lastvolume = xmms_remote_get_main_volume(g15analyser_vp.xmms_session);
186 + lastvolume = get_main_volume();
187 if (lastvolume >= 0)
188 g15r_drawBar (canvas, 10, 15, 149, 28, G15_COLOR_BLACK, lastvolume, 100, 1);
189 canvas->mode_xor=1;
190 @@ -1193,4 +1197,3 @@
191 return;
192
193 }
194 -
195
196
197
198 --
199 gentoo-commits@g.o mailing list