* trivial.c : trivial channel mixer plug-in (drops unwanted channels)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.10 2003/01/22 18:31:47 massiot Exp $
+ * $Id: trivial.c,v 1.11 2003/01/23 11:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
s32 * p_dest = (s32 *)p_out_buf->p_buffer;
s32 * p_src = (s32 *)p_in_buf->p_buffer;
+ p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
+ p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
+
if ( (p_filter->output.i_original_channels & AOUT_CHAN_PHYSMASK)
!= (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK)
&& (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK)
p_src += 2;
}
}
- else if ( p_filter->output.i_original_channels
- & AOUT_CHAN_REVERSESTEREO )
- {
- /* Reverse-stereo mode */
- for ( i = p_in_buf->i_nb_samples; i -= 2; )
- {
- *p_dest++ = p_src[1];
- *p_dest++ = p_src[0];
- p_src += 2;
- }
- }
else
{
/* Fake-stereo mode */
}
}
}
+ else if ( p_filter->output.i_original_channels
+ & AOUT_CHAN_REVERSESTEREO )
+ {
+ /* Reverse-stereo mode */
+ int i;
+ for ( i = p_in_buf->i_nb_samples; i--; )
+ {
+ *p_dest = p_src[1];
+ p_dest++;
+ *p_dest = p_src[0];
+ p_dest++;
+ p_src += 2;
+ }
+ }
else
{
SparseCopy( p_dest, p_src, p_in_buf->i_nb_samples, i_output_nb,
i_input_nb );
}
-
- p_out_buf->i_nb_samples = p_in_buf->i_nb_samples;
- p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb;
}
* open.m: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: open.m,v 1.11 2003/01/20 03:45:06 hartman Exp $
+ * $Id: open.m,v 1.12 2003/01/23 11:48:18 massiot Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
{
NSString *o_mode;
BOOL b_file = FALSE;
- BOOL b_udp = FALSE;
- BOOL b_rtp = FALSE;
+ BOOL b_net = FALSE;
o_mode = [[o_sout_access selectedCell] title];
if( [o_mode isEqualToString: _NS("File")] ) b_file = TRUE;
- else if( [o_mode isEqualToString: _NS("UDP")] ) b_udp = TRUE;
- else if( [o_mode isEqualToString: _NS("RTP")] ) b_rtp = TRUE;
+ else if( [o_mode isEqualToString: _NS("UDP")] ) b_net = TRUE;
+ else if( [o_mode isEqualToString: _NS("RTP")] ) b_net = TRUE;
[o_sout_file_path setEnabled: b_file];
[o_sout_file_btn_browse setEnabled: b_file];
- [o_sout_udp_addr setEnabled: b_udp|b_rtp];
- [o_sout_udp_port setEnabled: b_udp|b_rtp];
- [o_sout_udp_port_stp setEnabled: b_udp|b_rtp];
- [[o_sout_mux cellAtRow:0 column: 0] setEnabled: !b_rtp];
+ [o_sout_udp_addr setEnabled: b_net];
+ [o_sout_udp_port setEnabled: b_net];
+ [o_sout_udp_port_stp setEnabled: b_net];
+ [[o_sout_mux cellAtRow:0 column: 0] setEnabled: !b_net];
- if ( b_rtp )
+ if ( b_net )
{
[[o_sout_mux cellAtRow: 0 column:1] setState: YES];
}
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: output.c,v 1.31 2003/01/22 18:31:47 massiot Exp $
+ * $Id: output.c,v 1.32 2003/01/23 11:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
{
/* Mono - create the audio-channels variable. */
var_Create( p_aout, "audio-channels", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
+ val.psz_string = N_("Both");
+ var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
+ val.psz_string = N_("Left");
+ var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
+ val.psz_string = N_("Right");
+ var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
if ( p_aout->output.output.i_original_channels & AOUT_CHAN_DUALMONO )
{
/* Go directly to the left channel. */
p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
+ val.psz_string = N_("Left");
+ var_Set( p_aout, "audio-channels", val );
}
- else
- {
- val.psz_string = N_("Both");
- var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
- }
- val.psz_string = N_("Left");
- var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
- val.psz_string = N_("Right");
- var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL );
}
var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
val.psz_string = N_("Reverse stereo");
var_Change( p_aout, "audio-channels", VLC_VAR_ADDCHOICE, &val );
+ if ( p_aout->output.output.i_original_channels & AOUT_CHAN_DUALMONO )
+ {
+ /* Go directly to the left channel. */
+ p_aout->output.output.i_original_channels = AOUT_CHAN_LEFT;
+ val.psz_string = N_("Left");
+ var_Set( p_aout, "audio-channels", val );
+ }
var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
NULL );
}