set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_DEMUX )
- add_bool( "mod-noisereduction", true, NULL, N_("Noise reduction"),
+ add_bool( "mod-noisereduction", true, N_("Noise reduction"),
NOISE_LONGTEXT, false )
- add_bool( "mod-reverb", false, NULL, N_("Reverb"),
+ add_bool( "mod-reverb", false, N_("Reverb"),
REVERB_LONGTEXT, false )
add_integer_with_range( "mod-reverb-level", 0, 0, 100, NULL,
N_("Reverberation level"), REVERB_LEVEL_LONGTEXT, true )
add_integer_with_range( "mod-reverb-delay", 40, 0, 1000, NULL,
N_("Reverberation delay"), REVERB_DELAY_LONGTEXT, true )
- add_bool( "mod-megabass", false, NULL, N_("Mega bass"),
+ add_bool( "mod-megabass", false, N_("Mega bass"),
MEGABASS_LONGTEXT, false )
add_integer_with_range( "mod-megabass-level", 0, 0, 100, NULL,
N_("Mega bass level"), MEGABASS_LEVEL_LONGTEXT, true )
add_integer_with_range( "mod-megabass-range", 10, 10, 100, NULL,
N_("Mega bass cutoff"), MEGABASS_RANGE_LONGTEXT, true )
- add_bool( "mod-surround", false, NULL, N_("Surround"), N_("Surround"),
+ add_bool( "mod-surround", false, N_("Surround"), N_("Surround"),
false )
add_integer_with_range( "mod-surround-level", 0, 0, 100, NULL,
N_("Surround level"), SURROUND_LEVEL_LONGTEXT, true )
/* We accept file based on extension match */
if( !p_demux->b_force )
{
- const char *psz_ext = strrchr( p_demux->psz_path, '.' );
+ if( !p_demux->psz_file )
+ return VLC_EGENERIC;
+ const char *psz_ext = strrchr( p_demux->psz_file, '.' );
int i;
if( !psz_ext )
/* init time */
date_Init( &p_sys->pts, settings.mFrequency, 1 );
- date_Set( &p_sys->pts, 1 );
+ date_Set( &p_sys->pts, 0 );
p_sys->i_length = ModPlug_GetLength( p_sys->f ) * INT64_C(1000);
msg_Dbg( p_demux, "MOD loaded name=%s lenght=%"PRId64"ms",
}
p_frame->i_buffer = i_read;
p_frame->i_dts =
- p_frame->i_pts = date_Increment( &p_sys->pts, p_frame->i_buffer / i_bk );
+ p_frame->i_pts = VLC_TS_0 + date_Get( &p_sys->pts );
/* Set PCR */
es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_frame->i_pts );
/* Send data */
es_out_Send( p_demux->out, p_sys->es, p_frame );
+ date_Increment( &p_sys->pts, i_read / i_bk );
+
return 1;
}
pf = (double*) va_arg( args, double* );
if( p_sys->i_length > 0 )
{
- *pf = (double)date_Get( &p_sys->pts ) / (double)p_sys->i_length;
+ double current = date_Get( &p_sys->pts );
+ double length = p_sys->i_length;
+ *pf = current / length;
return VLC_SUCCESS;
}
return VLC_EGENERIC;
if( i64 >= 0 && i64 <= p_sys->i_length )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
- date_Set( &p_sys->pts, i64 + 1 );
+ date_Set( &p_sys->pts, i64 );
return VLC_SUCCESS;
}
if( i64 >= 0 && i64 <= p_sys->i_length )
{
ModPlug_Seek( p_sys->f, i64 / 1000 );
- date_Set( &p_sys->pts, i64 + 1 );
+ date_Set( &p_sys->pts, i64 );
return VLC_SUCCESS;
}
if( i_num_instruments )
{
i_temp_index = 0;
- for( int i = 0; i < i_num_instruments && i_temp_index < sizeof(psz_temp); i++ )
+ for( unsigned i = 0; i < i_num_instruments && i_temp_index < sizeof(psz_temp); i++ )
{
char lBuffer[33];
ModPlug_InstrumentName( p_sys->f, i, lBuffer );
}
/* Make list of samples */
- for( int i = 0; i < i_num_samples && i_temp_index < sizeof(psz_temp); i++ )
+ for( unsigned int i = 0; i < i_num_samples && i_temp_index < sizeof(psz_temp); i++ )
{
char psz_buffer[33];
ModPlug_SampleName( p_sys->f, i, psz_buffer );