]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/sdl.c
Disable live555 in distcheck
[vlc] / modules / audio_output / sdl.c
index 9b0e70d0172b85eb041bd5c214b078f02346683a..7dc215f1e4d4cb23a159d5fde676d6d7fd2335b6 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <string.h>                                            /* strerror() */
 #include <unistd.h>                                      /* write(), close() */
-#include <stdlib.h>                            /* calloc(), malloc(), free() */
 
-#include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+#include <vlc_aout.h>
 
 #include SDL_INCLUDE_FILE
 
@@ -57,14 +59,14 @@ struct aout_sys_t
 static int  Open        ( vlc_object_t * );
 static void Close       ( vlc_object_t * );
 static void Play        ( aout_instance_t * );
-static void SDLCallback ( void *, byte_t *, int );
+static void SDLCallback ( void *, uint8_t *, int );
 
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
     set_shortname( "SDL" );
-    set_description( _("Simple DirectMedia Layer audio output") );
+    set_description( N_("Simple DirectMedia Layer audio output") );
     set_capability( "audio output", 40 );
     set_category( CAT_AUDIO );
     set_subcategory( SUBCAT_AUDIO_AOUT );
@@ -93,7 +95,7 @@ static int Open ( vlc_object_t *p_this )
     /* Win32 SDL implementation doesn't support SDL_INIT_EVENTTHREAD yet */
     i_flags |= SDL_INIT_EVENTTHREAD;
 #endif
-#ifdef DEBUG
+#ifndef NDEBUG
     /* In debug mode you may want vlc to dump a core instead of staying
      * stuck */
     i_flags |= SDL_INIT_NOPARACHUTE;
@@ -213,7 +215,7 @@ static int Open ( vlc_object_t *p_this )
         var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
     }
 
-    val.b_bool = VLC_TRUE;
+    val.b_bool = true;
     var_Set( p_aout, "intf-change", val );
 
     p_aout->output.output.i_rate = obtained.freq;
@@ -228,6 +230,7 @@ static int Open ( vlc_object_t *p_this )
  *****************************************************************************/
 static void Play( aout_instance_t * p_aout )
 {
+    VLC_UNUSED(p_aout);
 }
 
 /*****************************************************************************
@@ -235,6 +238,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 );
@@ -243,7 +247,7 @@ static void Close ( vlc_object_t *p_this )
 /*****************************************************************************
  * SDLCallback: what to do once SDL has played sound samples
  *****************************************************************************/
-static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len )
+static void SDLCallback( void * _p_aout, uint8_t * p_stream, int i_len )
 {
     aout_instance_t * p_aout = (aout_instance_t *)_p_aout;
     aout_buffer_t *   p_buffer;
@@ -258,12 +262,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 );
+        vlc_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 );
+        vlc_memset( p_stream, 0, i_len );
     }
 }