* -> gives the feeling of a real room with a simple headphone
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: headphone.c,v 1.1 2002/12/09 00:52:42 babal Exp $
+ * $Id: headphone.c,v 1.5 2003/05/15 22:27:37 massiot Exp $
*
* Authors: Boris Dorès <babal@via.ecp.fr>
*
/*****************************************************************************
* Module descriptor
*****************************************************************************/
+#define HEADPHONE_DIM_TEXT N_("Characteristic dimension")
+#define HEADPHONE_DIM_LONGTEXT N_( \
+ "Headphone virtual spatialization effect parameter: "\
+ "distance between front left speaker and listener in meters.")
+
vlc_module_begin();
+ add_category_hint( N_("headphone"), NULL, VLC_FALSE );
+ add_integer( "headphone-dim", 5, NULL, HEADPHONE_DIM_TEXT,
+ HEADPHONE_DIM_LONGTEXT, VLC_TRUE );
set_description( _("headphone channel mixer with virtual spatialization effect") );
set_capability( "audio filter", 0 );
set_callbacks( Create, Destroy );
i_next_atomic_operation += 2;
i_source_channel_offset++;
}
+ if ( i_physical_channels & AOUT_CHAN_REARCENTER )
+ {
+ ComputeChannelOperations ( p_data , i_rate
+ , i_next_atomic_operation , i_source_channel_offset
+ , 0 , -d_z , 1.5 / i_nb_channels );
+ i_next_atomic_operation += 2;
+ i_source_channel_offset++;
+ }
if ( i_physical_channels & AOUT_CHAN_CENTER )
{
ComputeChannelOperations ( p_data , i_rate
i_next_atomic_operation += 2;
i_source_channel_offset++;
}
+ if ( i_physical_channels & AOUT_CHAN_MIDDLELEFT )
+ {
+ ComputeChannelOperations ( p_data , i_rate
+ , i_next_atomic_operation , i_source_channel_offset
+ , -d_x , 0 , 1.5 / i_nb_channels );
+ i_next_atomic_operation += 2;
+ i_source_channel_offset++;
+ }
+ if ( i_physical_channels & AOUT_CHAN_MIDDLERIGHT )
+ {
+ ComputeChannelOperations ( p_data , i_rate
+ , i_next_atomic_operation , i_source_channel_offset
+ , d_x , 0 , 1.5 / i_nb_channels );
+ i_next_atomic_operation += 2;
+ i_source_channel_offset++;
+ }
/* Initialize the overflow buffer
* we need it because the process induce a delay in the samples */