X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faudio_output%2Fsdl.c;h=fbf256d94596e5db54c4294ed50387aec827206c;hb=b321beb4ac88fb3d032b0f0132a8ce7348b52f89;hp=8242c1f7ab849caa87e70b7b0aa1d36df31d7011;hpb=f7fd8b6514d5427b5e177396e236c486142f3d97;p=vlc diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c index 8242c1f7ab..fbf256d945 100644 --- a/modules/audio_output/sdl.c +++ b/modules/audio_output/sdl.c @@ -1,8 +1,8 @@ /***************************************************************************** * sdl.c : SDL audio output plugin for vlc ***************************************************************************** - * Copyright (C) 2000-2002 VideoLAN - * $Id: sdl.c,v 1.26 2004/01/25 17:58:29 murray Exp $ + * Copyright (C) 2000-2002 the VideoLAN team + * $Id$ * * Authors: Michel Kaempf * Sam Hocevar @@ -21,21 +21,20 @@ * * 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 /* ENOMEM */ -#include /* open(), O_WRONLY */ -#include /* strerror() */ #include /* write(), close() */ -#include /* calloc(), malloc(), free() */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include -#include -#include "aout_internal.h" +#include #include SDL_INCLUDE_FILE @@ -65,8 +64,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(); @@ -92,7 +94,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; @@ -227,6 +229,7 @@ static int Open ( vlc_object_t *p_this ) *****************************************************************************/ static void Play( aout_instance_t * p_aout ) { + VLC_UNUSED(p_aout); } /***************************************************************************** @@ -234,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 ); @@ -257,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 ); } }