X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faudio_output%2Fsdl.c;h=7dc215f1e4d4cb23a159d5fde676d6d7fd2335b6;hb=166dc5d2b4e0856b8a0a8b54821561117f4fb42b;hp=34b9087e2090c53acd851a61ef5fcea92918b35e;hpb=db5fedc62315cfc0f93c0bb1fff76f53627142b8;p=vlc diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c index 34b9087e20..7dc215f1e4 100644 --- a/modules/audio_output/sdl.c +++ b/modules/audio_output/sdl.c @@ -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 @@ -21,21 +21,21 @@ * * 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() */ -#include -#include -#include "aout_internal.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include #include SDL_INCLUDE_FILE @@ -59,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 ); @@ -95,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; @@ -215,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; @@ -230,6 +230,7 @@ static int Open ( vlc_object_t *p_this ) *****************************************************************************/ static void Play( aout_instance_t * p_aout ) { + VLC_UNUSED(p_aout); } /***************************************************************************** @@ -237,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 ); @@ -245,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; @@ -260,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 ); } }