]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/sdl.c
Bugfix for #492: Audio output on Windows useing SPDIF for AC3 / DTS
[vlc] / modules / audio_output / sdl.c
index 34b9087e2090c53acd851a61ef5fcea92918b35e..3e98609e4eb3ef0db5ba486d8933fd4d7206fea7 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * sdl.c : SDL audio output plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000-2002 VideoLAN
+ * Copyright (C) 2000-2002 the VideoLAN team
  * $Id$
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <errno.h>                                                 /* ENOMEM */
-#include <fcntl.h>                                       /* open(), O_WRONLY */
-#include <string.h>                                            /* strerror() */
 #include <unistd.h>                                      /* write(), close() */
-#include <stdlib.h>                            /* calloc(), malloc(), free() */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
 
 #include SDL_INCLUDE_FILE
 
@@ -230,6 +229,7 @@ static int Open ( vlc_object_t *p_this )
  *****************************************************************************/
 static void Play( aout_instance_t * p_aout )
 {
+    VLC_UNUSED(p_aout);
 }
 
 /*****************************************************************************
@@ -237,6 +237,7 @@ static void Play( aout_instance_t * p_aout )
  *****************************************************************************/
 static void Close ( vlc_object_t *p_this )
 {
+    VLC_UNUSED(p_this);
     SDL_PauseAudio( 1 );
     SDL_CloseAudio();
     SDL_QuitSubSystem( SDL_INIT_AUDIO );
@@ -260,12 +261,12 @@ static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len )
 
     if ( p_buffer != NULL )
     {
-        p_aout->p_vlc->pf_memcpy( p_stream, p_buffer->p_buffer, i_len );
+        p_aout->p_libvlc->pf_memcpy( p_stream, p_buffer->p_buffer, i_len );
         aout_BufferFree( p_buffer );
     }
     else
     {
-        p_aout->p_vlc->pf_memset( p_stream, 0, i_len );
+        p_aout->p_libvlc->pf_memset( p_stream, 0, i_len );
     }
 }