/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <math.h> /* sqrt */
#ifdef HAVE_STDINT_H
# include <unistd.h>
#endif
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_es.h>
#include <vlc_block.h>
p_data->p_atomic_operations = malloc( sizeof(struct atomic_operation_t)
* p_data->i_nb_atomic_operations );
if( p_data->p_atomic_operations == NULL )
- {
- msg_Err( p_this, "out of memory" );
return -1;
- }
/* For each virtual speaker, computes elementary wave propagation time
* to each ear */
}
p_data->p_overflow_buffer = malloc( p_data->i_overflow_buffer_size );
if( p_data->p_atomic_operations == NULL )
- {
- msg_Err( p_this, "out of memory" );
return -1;
- }
memset( p_data->p_overflow_buffer, 0, p_data->i_overflow_buffer_size );
/* end */
/* Allocate the memory needed to store the module's structure */
p_sys = p_filter->p_sys = malloc( sizeof(filter_sys_t) );
if( p_sys == NULL )
- {
- msg_Err( p_filter, "out of memory" );
return VLC_EGENERIC;
- }
var_Create( p_this, MONO_CFG "downmix",
VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
if( !p_block || !p_block->i_samples )
{
if( p_block )
- p_block->pf_release( p_block );
+ block_Release( p_block );
return NULL;
}
if( !p_out )
{
msg_Warn( p_filter, "can't get output buffer" );
- p_block->pf_release( p_block );
+ block_Release( p_block );
return NULL;
}
p_out->i_samples = (p_block->i_samples / p_filter->p_sys->i_nb_channels) *
p_out->i_buffer = out_buf.i_nb_bytes;
p_out->i_samples = out_buf.i_nb_samples;
- p_block->pf_release( p_block );
+ block_Release( p_block );
return p_out;
}