Commit 9fef3403 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use pi_vlc_chan_order_wg4

parent 12627b88
......@@ -820,11 +820,9 @@ static int CreateDSBuffer( audio_output_t *p_aout, int i_format,
/* First set the sound buffer format */
waveformat.dwChannelMask = 0;
for( i = 0; i < sizeof(pi_channels_src)/sizeof(uint32_t); i++ )
{
if( i_channels & pi_channels_src[i] )
for( unsigned i = 0; pi_vlc_chan_order_wg4[i]; i++ )
if( i_channels & pi_vlc_chan_order_wg4[i] )
waveformat.dwChannelMask |= pi_channels_in[i];
}
switch( i_format )
{
......
......@@ -603,11 +603,9 @@ static int OpenWaveOut( audio_output_t *p_aout, uint32_t i_device_id, int i_form
#define waveformat p_aout->sys->waveformat
waveformat.dwChannelMask = 0;
for( unsigned i = 0; i < sizeof(pi_channels_src)/sizeof(uint32_t); i++ )
{
if( i_channels & pi_channels_src[i] )
for( unsigned i = 0; pi_vlc_chan_order_wg4[i]; i++ )
if( i_channels & pi_vlc_chan_order_wg4[i] )
waveformat.dwChannelMask |= pi_channels_in[i];
}
switch( i_format )
{
......
......@@ -128,11 +128,6 @@ typedef struct {
# define DSSPEAKER_7POINT1_WIDE DSSPEAKER_7POINT1
#endif
static const uint32_t pi_channels_src[] =
{ AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT,
AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0 };
static const uint32_t pi_channels_in[] =
{ SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT,
SPEAKER_SIDE_LEFT, SPEAKER_SIDE_RIGHT,
......
......@@ -79,12 +79,6 @@ struct sout_mux_sys_t
int pi_chan_table[AOUT_CHAN_MAX];
};
static const uint32_t pi_channels_src[] =
{ AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT,
AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0 };
static const uint32_t pi_channels_in[] =
{ WAVE_SPEAKER_FRONT_LEFT, WAVE_SPEAKER_FRONT_RIGHT,
WAVE_SPEAKER_SIDE_LEFT, WAVE_SPEAKER_SIDE_RIGHT,
......@@ -187,13 +181,9 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_sys->i_channel_mask = 0;
if( p_input->p_fmt->audio.i_physical_channels )
{
unsigned int i;
for( i = 0; i < sizeof(pi_channels_in)/sizeof(uint32_t); i++ )
{
if( p_input->p_fmt->audio.i_physical_channels & pi_channels_src[i])
for( unsigned i = 0; i < pi_vlc_chan_order_wg4[i]; i++ )
if( p_input->p_fmt->audio.i_physical_channels & pi_vlc_chan_order_wg4[i])
p_sys->i_channel_mask |= pi_channels_in[i];
}
p_sys->b_chan_reorder =
aout_CheckChannelReorder( pi_channels_in, pi_channels_out,
......
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