]> git.sesse.net Git - vlc/blobdiff - plugins/directx/aout_directx.c
-Fixed ac3_spdif which has been broken recently,
[vlc] / plugins / directx / aout_directx.c
index 19714e6f72cb2387659cf456574723551605c712..84d39763163b8c20f3553a665a0c0ec7cec4f760 100644 (file)
@@ -2,7 +2,7 @@
  * aout_directx.c: Windows DirectX audio output method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_directx.c,v 1.13 2001/12/07 18:33:07 sam Exp $
+ * $Id: aout_directx.c,v 1.16 2002/01/28 23:08:31 stef Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#define MODULE_NAME directx
-#include "modules_inner.h"
-
-
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include "defs.h"
-
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
 #include <string.h>                                            /* strerror() */
 #include <stdio.h>                                           /* "intf_msg.h" */
 #include <stdlib.h>                            /* calloc(), malloc(), free() */
 
-#include "common.h"                                     /* boolean_t, byte_t */
-#include "intf_msg.h"                        /* intf_DbgMsg(), intf_ErrMsg() */
-#include "threads.h"
-#include "mtime.h"
-#include "tests.h"
+#include <videolan/vlc.h>
 
 #if defined( _MSC_VER )
 #   include <dsound.h>
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-#include "modules_export.h"
+/*****************************************************************************
+ * DirectSound GUIDs.
+ * Defining them here allows us to get rid of the dxguid library during
+ * the linking stage.
+ *****************************************************************************/
+#include <initguid.h>
+DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
 
 /*****************************************************************************
  * aout_sys_t: directx audio output method descriptor
@@ -133,10 +128,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
 static int aout_Probe( probedata_t *p_data )
 {
     /* For now just assume the computer has a sound device */
-    if( TestMethod( AOUT_METHOD_VAR, "directx" ) )
-    {
-        return( 999 );
-    }
     return( 1 );
 }
 
@@ -173,11 +164,6 @@ static int aout_Open( aout_thread_t *p_aout )
 
 
     p_aout->psz_device = 0;
-    p_aout->i_format   = AOUT_FORMAT_DEFAULT;
-    p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
-                                                  AOUT_STEREO_DEFAULT );
-    p_aout->l_rate     = main_GetIntVariable( AOUT_RATE_VAR,
-                                              AOUT_RATE_DEFAULT );
 
     /* Initialise DirectSound */
     if( DirectxInitDSound( p_aout ) )
@@ -295,8 +281,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
 
     vlc_mutex_unlock( &p_aout->p_sys->buffer_lock );
 
-    p_aout->i_latency = 0;
-  
     return( 0 );
 }