# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_aout.h>
vlc_module_begin();
set_shortname( "PortAudio" );
- set_description( _("PORTAUDIO audio output") );
+ set_description( N_("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_libvlc->pf_memcpy( outputBuffer, p_buffer->p_buffer,
- framesPerBuffer * p_sys->i_sample_size );
+ vlc_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).
* one solution would be to link the no longer useful buffers
else
/* Audio output buffer shortage -> stop the fill process and wait */
{
- p_aout->p_libvlc->pf_memset( outputBuffer, 0,
- framesPerBuffer * p_sys->i_sample_size );
+ vlc_memset( outputBuffer, 0, framesPerBuffer * p_sys->i_sample_size );
}
return 0;
}
/* Allocate p_sys structure */
p_sys = (aout_sys_t *)malloc( sizeof(aout_sys_t) );
if( p_sys == NULL )
- {
- msg_Err( p_aout, "out of memory" );
return VLC_ENOMEM;
- }
p_sys->p_aout = p_aout;
p_sys->p_stream = 0;
p_aout->output.p_sys = p_sys;
pa_thread = vlc_object_create( p_aout, sizeof(pa_thread_t) );
pa_thread->p_aout = p_aout;
pa_thread->b_error = false;
- vlc_mutex_init( p_aout, &pa_thread->lock_wait );
+ vlc_mutex_init( &pa_thread->lock_wait );
vlc_cond_init( p_aout, &pa_thread->wait );
pa_thread->b_wait = false;
- vlc_mutex_init( p_aout, &pa_thread->lock_signal );
+ vlc_mutex_init( &pa_thread->lock_signal );
vlc_cond_init( p_aout, &pa_thread->signal );
pa_thread->b_signal = false;
aout_sys_t *p_sys;
int i_err;
- while( !pa_thread->b_die )
+ while( vlc_object_alive (pa_thread) )
{
/* Wait for start of stream */
vlc_mutex_lock( &pa_thread->lock_signal );