/*****************************************************************************
* portaudio.c : portaudio (v19) audio output plugin
*****************************************************************************
- * Copyright (C) 2002 the VideoLAN team
+ * Copyright (C) 2002, 2006 the VideoLAN team
* $Id$
*
* Authors: Frederic Ruget <frederic.ruget@free.fr>
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* 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 <string.h>
-#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include <vlc/vlc.h>
-#include <vlc/aout.h>
-#include <portaudio.h>
+#include <vlc_aout.h>
+
-#include "aout_internal.h"
+#include <portaudio.h>
#define FRAME_SIZE 1024 /* The size is in samples, not in bytes */
vlc_module_begin();
set_shortname( "PortAudio" );
- set_description( N_("PORTAUDIO audio output") );
+ set_description( _("PORTAUDIO audio output") );
set_category( CAT_AUDIO );
set_subcategory( SUBCAT_AUDIO_AOUT );
add_integer( "portaudio-device", 0, NULL,
p_sys->i_channels, p_sys->pi_chan_table,
p_sys->i_bits_per_sample );
}
- p_aout->p_vlc->pf_memcpy( outputBuffer, p_buffer->p_buffer,
+ p_aout->p_libvlc->pf_memcpy( outputBuffer, p_buffer->p_buffer,
framesPerBuffer * p_sys->i_sample_size );
/* aout_BufferFree may be dangereous here, but then so is
* aout_OutputNextBuffer (calls aout_BufferFree internally).
else
/* Audio output buffer shortage -> stop the fill process and wait */
{
- p_aout->p_vlc->pf_memset( outputBuffer, 0,
+ p_aout->p_libvlc->pf_memset( outputBuffer, 0,
framesPerBuffer * p_sys->i_sample_size );
}
return 0;
vlc_value_t val;
int i_err;
- msg_Dbg( p_aout, "Entering Open()");
+ msg_Dbg( p_aout, "entering Open()");
/* Allocate p_sys structure */
p_sys = (aout_sys_t *)malloc( sizeof(aout_sys_t) );
/* Close device for now. We'll re-open it later on */
if( ( i_err = Pa_Terminate() ) != paNoError )
{
- msg_Err( p_aout, "Pa_Terminate returned %d", i_err );
+ msg_Err( p_aout, "closing the device returned %d", i_err );
}
b_init = VLC_TRUE;
if( p_sys->deviceInfo->maxOutputChannels >= 6 )
{
val.i_int = AOUT_VAR_5_1;
- text.psz_string = N_("5.1");
+ text.psz_string = "5.1";
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE,
&val, &text );
msg_Dbg( p_aout, "device supports 5.1 channels" );