Commit abdf248d authored by Christophe Massiot's avatar Christophe Massiot

Fixed a dozen bugs regarding mono audio files.

parent f42c15f0
......@@ -3,7 +3,7 @@
* using MAD (MPEG Audio Decoder)
*****************************************************************************
* Copyright (C) 2001 by Jean-Paul Saman
* $Id: mpgatofixed32.c,v 1.1 2003/01/15 10:58:47 massiot Exp $
* $Id: mpgatofixed32.c,v 1.2 2003/01/20 10:59:29 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Paul Saman <jpsaman@wxs.nl>
......@@ -86,7 +86,7 @@ static int Create( vlc_object_t * _p_filter )
if ( p_filter->input.i_original_channels !=
p_filter->output.i_original_channels
&& p_filter->input.i_physical_channels !=
|| p_filter->input.i_physical_channels !=
p_filter->output.i_physical_channels )
{
return -1;
......
......@@ -2,7 +2,7 @@
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
* $Id: oss.c,v 1.45 2003/01/14 22:44:29 sam Exp $
* $Id: oss.c,v 1.46 2003/01/20 10:59:29 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -217,6 +217,10 @@ static void Probe( aout_instance_t * p_aout )
{
val.psz_string = N_("Mono");
var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val );
if ( p_aout->output.output.i_physical_channels == AOUT_CHAN_CENTER )
{
var_Set( p_aout, "audio-device", val );
}
}
......
......@@ -2,7 +2,7 @@
* common.c : audio output management of common data structures
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: common.c,v 1.13 2003/01/15 10:58:48 massiot Exp $
* $Id: common.c,v 1.14 2003/01/20 10:59:29 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -171,7 +171,7 @@ const char * aout_FormatPrintChannels( const audio_sample_format_t * p_format )
else if ( p_format->i_original_channels & AOUT_CHAN_DUALMONO )
return "Dual-mono";
else if ( p_format->i_original_channels == AOUT_CHAN_CENTER )
return "Mono";
return "Stereo/Mono";
else if ( !(p_format->i_original_channels & AOUT_CHAN_RIGHT) )
return "Stereo/Left";
else if ( !(p_format->i_original_channels & AOUT_CHAN_LEFT) )
......
......@@ -2,7 +2,7 @@
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: output.c,v 1.28 2003/01/04 16:27:49 gbazin Exp $
* $Id: output.c,v 1.29 2003/01/20 10:59:29 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -89,7 +89,9 @@ int aout_OutputNew( aout_instance_t * p_aout,
}
free( val.psz_string );
}
else if ( p_aout->output.output.i_physical_channels == AOUT_CHAN_CENTER )
else if ( p_aout->output.output.i_physical_channels == AOUT_CHAN_CENTER
&& (p_aout->output.output.i_original_channels
& AOUT_CHAN_PHYSMASK) == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) )
{
/* Mono - create the audio-channels variable. */
var_Create( p_aout, "audio-channels", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
......@@ -112,8 +114,8 @@ int aout_OutputNew( aout_instance_t * p_aout,
}
else if ( p_aout->output.output.i_physical_channels ==
(AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT)
&& p_aout->output.output.i_original_channels ==
(AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) )
&& (p_aout->output.output.i_original_channels
& AOUT_CHAN_PHYSMASK) == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) )
{
/* Stereo - create the audio-channels variable. */
var_Create( p_aout, "audio-channels", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
......
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