]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/sdl.c
Fix some cast warnings
[vlc] / modules / audio_output / sdl.c
index 7695bfd35383d687c33a0722234c6d71fbf8a3e3..d91fcc2b16a6186b2dc12091bb04800430e89dbe 100644 (file)
@@ -1,11 +1,11 @@
 /*****************************************************************************
  * sdl.c : SDL audio output plugin for vlc
  *****************************************************************************
- * Copyright (C) 2000-2002 VideoLAN
- * $Id: sdl.c,v 1.23 2003/10/25 00:49:13 sam Exp $
+ * Copyright (C) 2000-2002 the VideoLAN team
+ * $Id$
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
- *          Samuel Hocevar <sam@zoy.org>
+ *          Sam Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
  *          Christophe Massiot <massiot@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() */
 
 #include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
 
 #include SDL_INCLUDE_FILE
 
@@ -65,8 +60,11 @@ static void SDLCallback ( void *, byte_t *, int );
  * Module descriptor
  *****************************************************************************/
 vlc_module_begin();
+    set_shortname( "SDL" );
     set_description( _("Simple DirectMedia Layer audio output") );
     set_capability( "audio output", 40 );
+    set_category( CAT_AUDIO );
+    set_subcategory( SUBCAT_AUDIO_AOUT );
     add_shortcut( "sdl" );
     set_callbacks( Open, Close );
 vlc_module_end();
@@ -173,11 +171,11 @@ static int Open ( vlc_object_t *p_this )
         {
             var_Create( p_aout, "audio-device",
                         VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
-            text.psz_string = _("Audio device");
+            text.psz_string = _("Audio Device");
             var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );
 
             val.i_int = (obtained.channels == 2) ? AOUT_VAR_STEREO :
-                       AOUT_VAR_MONO;
+                        AOUT_VAR_MONO;
             text.psz_string = (obtained.channels == 2) ? N_("Stereo") :
                               N_("Mono");
             var_Change( p_aout, "audio-device",
@@ -191,7 +189,7 @@ static int Open ( vlc_object_t *p_this )
         /* First launch. */
         var_Create( p_aout, "audio-device",
                     VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
-        text.psz_string = _("Audio device");
+        text.psz_string = _("Audio Device");
         var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );
 
         val.i_int = AOUT_VAR_STEREO;
@@ -257,12 +255,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 );
     }
 }