summaryrefslogtreecommitdiffstats
path: root/xine_artsplugin
diff options
context:
space:
mode:
authormio <stigma@disroot.org>2024-09-28 15:43:09 +1000
committermio <stigma@disroot.org>2024-09-28 20:14:07 +1000
commitf6b2ca587cc8163ff028f6f76bf585d09342b1c6 (patch)
treee7c82a4de717fae47bfb2b4578220968b5e6e996 /xine_artsplugin
parentb294254eb83bdaa5f26ace3f0356544c92b249cf (diff)
downloadtdemultimedia-f6b2ca587cc8163ff028f6f76bf585d09342b1c6.tar.gz
tdemultimedia-f6b2ca587cc8163ff028f6f76bf585d09342b1c6.zip
Fix FTBFS when xinelib <= 1.2.9
Resolves: https://mirror.git.trinitydesktop.org/gitea/TDE/tdemultimedia/issues/83 Signed-off-by: mio <stigma@disroot.org>
Diffstat (limited to 'xine_artsplugin')
-rw-r--r--xine_artsplugin/audio_fifo_out.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/xine_artsplugin/audio_fifo_out.c b/xine_artsplugin/audio_fifo_out.c
index 3087bce0..bc64277f 100644
--- a/xine_artsplugin/audio_fifo_out.c
+++ b/xine_artsplugin/audio_fifo_out.c
@@ -22,7 +22,7 @@
#include <sys/time.h>
#include <xine/audio_out.h>
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
#include <xine/xine_internal.h>
#include <xine/xine_plugin.h>
#endif
@@ -52,7 +52,7 @@ typedef struct fifo_driver_s {
int fifo_flush;
int fifo_delay;
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
config_values_t *config;
xine_t *xine;
#endif
@@ -292,7 +292,7 @@ static int ao_fifo_control( ao_driver_t *this_gen, int cmd, ... )
return 0;
}
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
static fifo_driver_t * _ao_driver = NULL;
typedef struct fifo_class_s {
@@ -354,9 +354,18 @@ static ao_driver_t * _arts_open(audio_driver_class_t *driver_class, const void *
return &_ao_driver->ao_driver;
}
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION > 2) || \
+ (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION == 2 && XINE_SUB_VERSION >= 10)
+
static void *_arts_plugin_class_init(xine_t *xine, const void *data) {
+
+#else
+
+static void *_arts_plugin_class_init(xine_t *xine, void *data) {
+
+#endif
fifo_class_t *cl;
-
+
cl = (fifo_class_t *) malloc(sizeof(fifo_class_t));
if (!cl) return NULL;
cl->driver_class.open_plugin = _arts_open;
@@ -365,7 +374,7 @@ static void *_arts_plugin_class_init(xine_t *xine, const void *data) {
cl->driver_class.dispose = _arts_class_dispose;
cl->config = xine->config;
cl->xine = xine;
-
+
return cl;
}
@@ -388,7 +397,7 @@ xine_audio_port_t *init_audio_out_plugin( xine_t *xine, xine_arts_audio *audio,
xine->verbosity = 1;
#endif
-#if (XINE_MAJOR_VERSION >= 1) && (XINE_MINOR_VERSION >= 2)
+#if (XINE_MAJOR_VERSION > 1) || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2)
xine_audio_port_t *ret;
xine_register_plugins(xine, arts_xine_plugin_info);
ret = xine_open_audio_driver( xine, "arts", audio );