From 6fc61879fcde8b512d5654588bc8daa2fb13128e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Thu, 1 Jan 2004 18:14:51 +0000 Subject: Win32 port, mainly DirectX: * use DirectX under CygWin and basic auto-stuff * move some my macros in configure.ac * I don't know why, but shared directx plugins can't be linked with libdxguid.a. Used cute-hack, idea is from mplayer. Also thanks to hexedit, because I haven't sources of w32api. * Fix some warnings in vo directx and ao directx. * Decrease version of directx. It seems it still works. For compilation with DirectX under Cygwin you need header files from directx-sdk. Autoconf macros are only basic, but it works. for example: DIRECTX_CFLAGS=-I/cygrive/c/Program\ Files/Directx/include ./autogen.sh CVS patchset: 5971 CVS date: 2004/01/01 18:14:51 --- src/audio_out/Makefile.am | 15 ++++++++++++--- src/audio_out/audio_directx_out.c | 22 ++++++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) (limited to 'src/audio_out') diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 84173fad2..6451fcc37 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -1,8 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = -DXINE_COMPILE $(ALSA_CFLAGS) $(ESD_CFLAGS) $(IRIXAL_CFLAGS) $(ARTS_CFLAGS) +AM_CFLAGS = -DXINE_COMPILE $(ALSA_CFLAGS) $(ESD_CFLAGS) $(IRIXAL_CFLAGS) $(ARTS_CFLAGS) $(DIRECTX_CFLAGS) -EXTRA_DIST = audio_irixal_out.c audio_directx_out.c +EXTRA_DIST = audio_irixal_out.c libdir = $(XINE_PLUGINDIR) @@ -32,6 +32,10 @@ if HAVE_ARTS arts_module = xineplug_ao_out_arts.la endif +if HAVE_DIRECTX +directx_module = xineplug_ao_out_directx.la +endif + ## # IMPORTANT: # --------- @@ -42,7 +46,8 @@ lib_LTLIBRARIES = xineplug_ao_out_none.la $(oss_module) \ $(alsa_module) \ $(sun_module) \ $(arts_module) \ - $(esd_module) + $(esd_module) \ + $(directx_module) #lib_LTLIBRARIES = \ # $(alsa_module) \ @@ -78,3 +83,7 @@ xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ + +xineplug_ao_out_directx_la_SOURCES = audio_directx_out.c +xineplug_ao_out_directx_la_LIBADD = $(DIRECTX_AUDIO_LIBS) $(XINE_LIB) +xineplug_ao_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index df6c2b38c..8b0c327f8 100755 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -20,15 +20,13 @@ * audio_directx_out.c, direct sound audio output plugin for xine * by Matthew Grooms * - * $Id: audio_directx_out.c,v 1.8 2003/12/14 22:13:22 siggi Exp $ + * $Id: audio_directx_out.c,v 1.9 2004/01/01 18:14:51 valtri Exp $ */ typedef unsigned char boolean; #include #include -#include "audio_out.h" -#include "xine_internal.h" #define LOG_MODULE "audio_directx_out" #define LOG_VERBOSE @@ -36,6 +34,10 @@ typedef unsigned char boolean; #define LOG */ +#include "audio_out.h" +#include "xine_internal.h" + + #define MAX_CHANNELS 6 #define MAX_BITS 16 #define MAX_SAMPLE_RATE 44100 @@ -48,6 +50,18 @@ typedef unsigned char boolean; #define AO_DIRECTX_IFACE_VERSION 8 +/***************************************************************************** + * DirectDraw GUIDs. + * Defining them here allows us to get rid of the dxguid library during + * the linking stage. + *****************************************************************************/ +#if 1 +static const GUID IID_IDirectSoundNotify = { + 0xB0210783,0x89CD,0x11D0,{0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16} +}; +#endif + + /* ----------------------------------------- * * ao_directx driver struct @@ -804,7 +818,7 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da return ( ao_driver_t * ) ao_directx; } -static char* get_identifier (video_driver_class_t *this_gen) { +static char* get_identifier (audio_driver_class_t *this_gen) { return "DirectX"; } -- cgit v1.2.3