Commit e8ce66c2 authored by Christophe Massiot's avatar Christophe Massiot

* modules/gui/macosx/open.m: Stream output doesn't do UDP/PS,

* modules/audio_filter/channel_mixer/trivial.c: Fixed reverse stereo mode
  with MPEG files,
* src/audio_output/output.c: Fixed dual-mono handling.
parent 916664af
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -113,6 +113,9 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
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)
......@@ -134,17 +137,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
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 */
......@@ -158,13 +150,24 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
}
}
}
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;
}
......@@ -2,7 +2,7 @@
* 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>
......@@ -773,23 +773,22 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
{
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];
}
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -100,20 +100,19 @@ int aout_OutputNew( aout_instance_t * p_aout,
{
/* 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 );
}
......@@ -137,6 +136,13 @@ int aout_OutputNew( aout_instance_t * p_aout,
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 );
}
......
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