comparison src/crossfade/player.c @ 3059:2e241e90494a

Import work in progress xmms-crossfade rewrite.
author William Pitcock <nenolod@atheme.org>
date Fri, 24 Apr 2009 05:57:35 -0500
parents
children 85b7dcee821f
comparison
equal deleted inserted replaced
3058:2e649bf16ebc 3059:2e241e90494a
1 /*
2 * XMMS Crossfade Plugin
3 * Copyright (C) 2000-2007 Peter Eisenlohr <peter@eisenlohr.org>
4 *
5 * based on the original OSS Output Plugin
6 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21 * USA.
22 */
23
24 #include <audacious/plugin.h>
25 #include "player.h"
26
27 #if defined(COMPILE_FOR_XMMS) /***********************************************/
28
29 gboolean get_input_playing();
30 gboolean xfplayer_input_playing() {
31 return get_input_playing();
32 }
33
34 gint get_playlist_position();
35 gint xfplaylist_get_position() {
36 return get_playlist_position();
37 }
38
39 gchar *playlist_get_filename(gint pos);
40 gchar *xfplaylist_get_filename(gint pos) {
41 return playlist_get_filename(pos);
42 }
43
44 gchar *playlist_get_songtitle(gint pos);
45 gchar *xfplaylist_get_songtitle(gint pos) {
46 return playlist_get_songtitle(pos);
47 }
48
49 gint playlist_get_current_length();
50 gint xfplaylist_current_length() {
51 return playlist_get_current_length();
52 }
53
54 GList *get_output_list();
55 GList *xfplayer_get_output_list () {
56 return get_output_list();
57 }
58
59 GList *get_effect_list();
60 GList *xfplayer_get_effect_list() {
61 return get_effect_list();
62 }
63
64 gboolean xfplayer_effects_enabled() {
65 return effects_enabled();
66 }
67
68 EffectPlugin *xfplayer_get_current_effect_plugin() {
69 return get_current_effect_plugin();
70 }
71
72 gboolean xfplayer_check_realtime_priority() {
73 return xmms_check_realtime_priority();
74 }
75
76 #elif defined(COMPILE_FOR_AUDACIOUS) /****************************************/
77 #if AUDACIOUS_ABI_VERSION >= 2 /*--------------------------------------------*/
78
79 gboolean xfplayer_input_playing() {
80 return audacious_drct_get_playing();
81 }
82
83 gint xfplaylist_get_position() {
84 Playlist *playlist = aud_playlist_get_active();
85 return aud_playlist_get_position(playlist);
86 }
87
88 gchar *xfplaylist_get_filename(gint pos) {
89 Playlist *playlist = aud_playlist_get_active();
90 char *uri = aud_playlist_get_filename(playlist, pos);
91 return g_filename_from_uri(uri, NULL, NULL);
92 }
93
94 gchar *xfplaylist_get_songtitle(gint pos) {
95 Playlist *playlist = aud_playlist_get_active();
96 return aud_playlist_get_songtitle(playlist, pos);
97 }
98
99 gint xfplaylist_current_length() {
100 Playlist *playlist = aud_playlist_get_active();
101 return aud_playlist_get_current_length(playlist);
102 }
103
104 GList *xfplayer_get_output_list() {
105 return aud_get_output_list();
106 }
107
108 #else /*---------------------------------------------------------------------*/
109
110 #if AUDACIOUS_ABI_VERSION >= 1
111 gboolean playback_get_playing(); /* >= Audacious-1.3.0 */
112 gboolean xfplayer_input_playing() {
113 return playback_get_playing();
114 }
115 #else
116 gboolean bmp_playback_get_playing(); /* Audacious (old) */
117 gboolean xfplayer_input_playing() {
118 return bmp_playback_get_playing();
119 }
120 #endif
121
122 gint xfplaylist_get_position() {
123 return playlist_get_position(playlist_get_active());
124 }
125
126 gchar *xfplaylist_get_filename(gint pos) {
127 char *uri = playlist_get_filename(playlist_get_active(), pos);
128 return g_filename_from_uri(uri, NULL, NULL);
129 }
130
131 gchar *xfplaylist_get_songtitle(gint pos) {
132 return playlist_get_songtitle(playlist_get_active(), pos);
133 }
134
135 gint xfplaylist_current_length() {
136 return playlist_get_current_length(playlist_get_active());
137 }
138
139 GList *get_output_list();
140 GList *xfplayer_get_output_list() {
141 return get_output_list();
142 }
143
144 #endif /*--------------------------------------------------------------------*/
145
146 GList *xfplayer_get_effect_list() {
147 return NULL;
148 }
149
150 EffectPlugin *xfplayer_get_current_effect_plugin() {
151 return NULL;
152 }
153
154 gboolean xfplayer_effects_enabled() {
155 return FALSE;
156 }
157
158 gboolean xfplayer_check_realtime_priority() {
159 return FALSE;
160 }
161
162 #endif /**********************************************************************/