]> git.sesse.net Git - vlc/blobdiff - plugins/sdl/aout_sdl.c
* Fixed the BeOS compile typo.
[vlc] / plugins / sdl / aout_sdl.c
index a6d2977421c5293d1bb8ce6c1140ec1cc45249c1..6a3c2acbee230341a3258adb0ceec2baac718486 100644 (file)
@@ -2,7 +2,7 @@
  * aout_sdl.c : audio sdl functions library
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: aout_sdl.c,v 1.10 2001/03/21 13:42:34 sam Exp $
+ * $Id: aout_sdl.c,v 1.13 2001/05/30 17:03:12 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -33,7 +33,6 @@
 
 #include <errno.h>                                                 /* ENOMEM */
 #include <fcntl.h>                                       /* open(), O_WRONLY */
-#include <sys/ioctl.h>                                            /* ioctl() */
 #include <string.h>                                            /* strerror() */
 #include <unistd.h>                                      /* write(), close() */
 #include <stdio.h>                                           /* "intf_msg.h" */
@@ -53,6 +52,7 @@
 #include "main.h"
 
 #include "modules.h"
+#include "modules_export.h"
 
 /*****************************************************************************
  * aout_sys_t: dsp audio output method descriptor
@@ -110,7 +110,6 @@ static int aout_Probe( probedata_t *p_data )
 {
     SDL_AudioSpec desired, obtained;
 
-    return 0;
     /* Start AudioSDL */
     if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
     {
@@ -121,7 +120,7 @@ static int aout_Probe( probedata_t *p_data )
     desired.freq       = 11025;                                 /* frequency */
     desired.format     = AUDIO_U8;                        /* unsigned 8 bits */
     desired.channels   = 2;                                          /* mono */
-    desired.callback   = NULL;                   /* no callback function yet */
+    desired.callback   = aout_SDLCallback;    /* callback function mandatory */
     desired.userdata   = NULL;                     /* null parm for callback */
     desired.samples    = 4096;
 
@@ -134,6 +133,7 @@ static int aout_Probe( probedata_t *p_data )
     }
 
     /* Otherwise, there are good chances we can use this plugin, return 100. */
+    intf_DbgMsg( "aout: SDL_OpenAudio successfully run" );
     SDL_CloseAudio();
 
     if( TestMethod( AOUT_METHOD_VAR, "sdl" ) )