/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h> /* malloc(), free() */
-#include <math.h>
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include <stdlib.h> /* malloc(), free() */
+#include <math.h>
+
#include <vlc_common.h>
#include <vlc_plugin.h>
#include "vlc_aout.h"
#define WIDTH_TEXT N_("Room width")
#define WIDTH_LONGTEXT N_("Width of the virtual room")
-#define WET_TEXT ""
-#define WET_LONGTEXT ""
+#define WET_TEXT N_("Wet")
+#define WET_LONGTEXT NULL
-#define DRY_TEXT ""
-#define DRY_LONGTEXT ""
+#define DRY_TEXT N_("Dry")
+#define DRY_LONGTEXT NULL
-#define DAMP_TEXT ""
-#define DAMP_LONGTEXT ""
+#define DAMP_TEXT N_("Damp")
+#define DAMP_LONGTEXT NULL
vlc_module_begin ()
- set_description( N_("spatializer") )
+ set_description( N_("Audio Spatializer") )
set_shortname( N_("Spatializer" ) )
set_capability( "audio filter", 0 )
set_category( CAT_AUDIO )
set_callbacks( Open, Close )
add_shortcut( "spatializer" )
- 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)
+ add_float( "spatializer-roomsize", 1.05, NULL, ROOMSIZE_TEXT,
+ ROOMSIZE_LONGTEXT, true )
+ add_float( "spatializer-width", 10., NULL, WIDTH_TEXT,WIDTH_LONGTEXT, true )
+ add_float( "spatializer-wet", 3., NULL, WET_TEXT,WET_LONGTEXT, true )
+ add_float( "spatializer-dry", 2., NULL, DRY_TEXT,DRY_LONGTEXT, true )
+ add_float( "spatializer-damp", 1., NULL, DAMP_TEXT,DAMP_LONGTEXT, true )
vlc_module_end ()
/*****************************************************************************
static const char *psz_control_names[] =
{
- "Roomsize", "Width" , "Wet", "Dry", "Damp"
+ "spatializer-roomsize", "spatializer-width" ,
+ "spatializer-wet", "spatializer-dry", "spatializer-damp"
};
static void DoWork( aout_instance_t *, aout_filter_t *,
aout_buffer_t *, aout_buffer_t * );
aout_filter_t *p_filter = (aout_filter_t *)p_this;
aout_filter_sys_t *p_sys;
bool b_fit = true;
- msg_Dbg(p_this, "Opening filter spatializer %s %s %d\n", __FILE__,__func__,__LINE__);
+ msg_Dbg(p_this, "Opening filter spatializer %s %s %d", __FILE__,__func__,__LINE__);
- if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
- p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+ if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+ p_filter->output.i_format != VLC_CODEC_FL32 )
{
b_fit = false;
- p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
- p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+ p_filter->input.i_format = VLC_CODEC_FL32;
+ p_filter->output.i_format = VLC_CODEC_FL32;
msg_Warn( p_filter, "bad input or output format" );
}
if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
delete p_sys->p_reverbm;
vlc_mutex_destroy( &p_sys->lock );
free( p_sys );
- msg_Dbg(p_this, "Closing filter spatializer %s %s %d\n", __FILE__,__func__,__LINE__);
+ msg_Dbg(p_this, "Closing filter spatializer %s %s %d", __FILE__,__func__,__LINE__);
}
/*****************************************************************************
CLocker locker( &p_sys->lock );
p_sys->p_reverbm->setroomsize(newval.f_float);
- msg_Dbg (p_this,"room callback %3.1f %s %s %d\n", newval.f_float, __FILE__,__func__,__LINE__);
+ msg_Dbg (p_this,"room callback %3.1f %s %s %d", newval.f_float, __FILE__,__func__,__LINE__);
return VLC_SUCCESS;
}
CLocker locker( &p_sys->lock );
p_sys->p_reverbm->setwidth(newval.f_float);
- msg_Dbg (p_this,"width callback %3.1f %s %s %d\n", newval.f_float, __FILE__,__func__,__LINE__);
+ msg_Dbg (p_this,"width callback %3.1f %s %s %d", newval.f_float, __FILE__,__func__,__LINE__);
return VLC_SUCCESS;
}
static int WetCallback( vlc_object_t *p_this, char const *psz_cmd,
CLocker locker( &p_sys->lock );
p_sys->p_reverbm->setwet(newval.f_float);
- msg_Dbg (p_this,"wet callback %3.1f %s %s %d\n", newval.f_float, __FILE__,__func__,__LINE__);
+ msg_Dbg (p_this,"wet callback %3.1f %s %s %d", newval.f_float, __FILE__,__func__,__LINE__);
return VLC_SUCCESS;
}
static int DryCallback( vlc_object_t *p_this, char const *psz_cmd,
CLocker locker( &p_sys->lock );
p_sys->p_reverbm->setdry(newval.f_float);
- msg_Dbg (p_this,"dry callback %3.1f %s %s %d\n", newval.f_float, __FILE__,__func__,__LINE__);
+ msg_Dbg (p_this,"dry callback %3.1f %s %s %d", newval.f_float, __FILE__,__func__,__LINE__);
return VLC_SUCCESS;
}
static int DampCallback( vlc_object_t *p_this, char const *psz_cmd,
CLocker locker( &p_sys->lock );
p_sys->p_reverbm->setdamp(newval.f_float);
- msg_Dbg (p_this, "damp callback %3.1f %s %s %d\n", newval.f_float, __FILE__,__func__,__LINE__);
+ msg_Dbg (p_this, "damp callback %3.1f %s %s %d", newval.f_float, __FILE__,__func__,__LINE__);
return VLC_SUCCESS;
}