Commit e991ef5d authored by Geoffroy Couprie's avatar Geoffroy Couprie

Should remove the big white noise that was produced

parent 43ffaaf1
......@@ -9,6 +9,10 @@
#include "denormals.h"
/**
* Combination filter
*Takes multiple audio channels and mix them for one ear
*/
class comb
{
public:
......@@ -35,25 +39,20 @@ private:
inline float comb::process(float input)
{
#if 1
/* FIXME FIXME FIXME
* comb::process is completly broken so ignore it for now */
return 0.0;
#else
/* FIXME
* comb::process is not really ear-friendly the tunning values must
* be changed*/
float output;
output = undenormalise( buffer[bufidx] );
filterstore = undenormalise( output*damp2 + filterstore*damp1 );
filterstore = undenormalise(output*damp2);
buffer[bufidx] = input + filterstore*feedback;
if(++bufidx>=bufsize) bufidx = 0;
return output;
#endif
}
#endif //_comb_
......
......@@ -80,6 +80,13 @@ void revmodel::mute()
}
}
/*****************************************************************************
* Transforms the audio stream
* /param float *inputL input buffer
* /param float *outputL output buffer
* /param long numsamples number of samples to be processed
* /param int skip number of channels in the audio stream
*****************************************************************************/
void revmodel::processreplace(float *inputL, float *outputL, long numsamples, int skip)
{
float outL,outR,input;
......@@ -87,6 +94,7 @@ void revmodel::processreplace(float *inputL, float *outputL, long numsamples, in
int i;
outL = outR = 0;
/* TODO this module supports only 2 audio channels, let's improve this */
if (skip > 1)
inputR = inputL[1];
else
......
/*****************************************************************************
* spatializer.cpp:
* spatializer.cpp: sound reverberation
*****************************************************************************
* Copyright (C) 2004, 2006, 2007 the VideoLAN team
*
......@@ -45,6 +45,22 @@
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
#define ROOMSIZE_TEXT N_("Room size")
#define ROOMSIZE_LONGTEXT N_("Defines the virtual surface of the room" \
"emulated by the filter." )
#define WIDTH_TEXT N_("Room width")
#define WIDTH_LONGTEXT N_("Width of the virtual room")
#define WET_TEXT N_("")
#define WET_LONGTEXT N_("")
#define DRY_TEXT N_("")
#define DRY_LONGTEXT N_("")
#define DAMP_TEXT N_("")
#define DAMP_LONGTEXT N_("")
vlc_module_begin();
set_description( N_("spatializer") );
set_shortname( N_("spatializer" ) );
......@@ -54,11 +70,11 @@ vlc_module_begin();
set_callbacks( Open, Close );
add_shortcut( "spatializer" );
add_float( "Roomsize", 1.05, NULL, NULL,NULL, true);
add_float( "Width", 10.0, NULL, NULL,NULL, true);
add_float( "Wet", 3.0, NULL, NULL,NULL, true);
add_float( "Dry", 2.0, NULL, NULL,NULL, true);
add_float( "Damp", 1.0, NULL, NULL,NULL, true);
add_float( "Roomsize", 1.05, NULL, ROOMSIZE_TEXT,ROOMSIZE_LONGTEXT, true);
add_float( "Width", 10.0, NULL, WIDTH_TEXT,WIDTH_LONGTEXT, true);
add_float( "Wet", 3.0, NULL, WET_TEXT,WET_LONGTEXT, true);
add_float( "Dry", 2.0, NULL, DRY_TEXT,DRY_LONGTEXT, true);
add_float( "Damp", 1.0, NULL, DAMP_TEXT,DAMP_LONGTEXT, true);
vlc_module_end();
/*****************************************************************************
......@@ -173,8 +189,6 @@ static void Close( vlc_object_t *p_this )
/*****************************************************************************
* DoWork: process samples buffer
*****************************************************************************
*
*****************************************************************************/
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
......@@ -255,6 +269,10 @@ static void SpatClean( aout_filter_t *p_filter )
var_DelCallback( p_aout, psz_control_names[4], DampCallback, p_sys );
}
/*****************************************************************************
* Variables callbacks
*****************************************************************************/
static int RoomCallback( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment