/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <vlc/vlc.h>
#ifdef HAVE_ALLOCA_H
{
aout_input_t * p_input;
input_thread_t * p_input_thread;
- vlc_value_t val;
/* Sanitize audio format */
if( p_format->i_channels > 32 )
p_input->b_changed = 0;
p_input->b_error = 1;
+
aout_FormatPrepare( p_format );
+
memcpy( &p_input->input, p_format,
sizeof(audio_sample_format_t) );
if( p_replay_gain )
aout_InputNew( p_aout, p_input );
vlc_mutex_unlock( &p_aout->mixer_lock );
- var_Create( p_this, "audio-desync", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Get( p_this, "audio-desync", &val );
- p_input->i_desync = val.i_int * 1000;
+ p_input->i_desync = var_CreateGetInteger( p_this, "audio-desync" ) * 1000;
p_input_thread = (input_thread_t *)vlc_object_find( p_this,
VLC_OBJECT_INPUT, FIND_PARENT );
/*****************************************************************************
* aout_DecNewBuffer : ask for a new empty buffer
*****************************************************************************/
-aout_buffer_t * aout_DecNewBuffer( aout_instance_t * p_aout,
- aout_input_t * p_input,
+aout_buffer_t * aout_DecNewBuffer( aout_input_t * p_input,
size_t i_nb_samples )
{
aout_buffer_t * p_buffer;