Commit e21a2389 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix for if only several channels are not set.

parent 46148fda
...@@ -300,36 +300,40 @@ static int Open( vlc_object_t * p_this ) ...@@ -300,36 +300,40 @@ static int Open( vlc_object_t * p_this )
continue; continue;
default: default:
msg_Warn( p_aout, "Unrecognized channel form provided by driver: %d", (int)layout->mChannelDescriptions[i].mChannelLabel ); msg_Warn( p_aout, "Unrecognized channel form provided by driver: %d", (int)layout->mChannelDescriptions[i].mChannelLabel );
switch( layout->mNumberChannelDescriptions ) if( i == 0 )
{ {
/* We make assumptions based on number of channels here. msg_Warn( p_aout, "Probably no channellayout is set. force based on channelcount" );
* Unfortunatly Apple has provided no 100% method to retrieve the speaker configuration */ switch( layout->mNumberChannelDescriptions )
case 1: {
p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER; /* We make assumptions based on number of channels here.
break; * Unfortunatly Apple has provided no 100% method to retrieve the speaker configuration */
case 4: case 1:
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER;
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; break;
break; case 4:
case 6: p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT;
AOUT_CHAN_CENTER | AOUT_CHAN_LFE | break;
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; case 6:
break; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
case 7: AOUT_CHAN_CENTER | AOUT_CHAN_LFE |
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT;
AOUT_CHAN_CENTER | AOUT_CHAN_LFE | break;
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_REARCENTER; case 7:
break; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
case 8: AOUT_CHAN_CENTER | AOUT_CHAN_LFE |
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_REARCENTER;
AOUT_CHAN_CENTER | AOUT_CHAN_LFE | break;
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | case 8:
AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT; p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT |
break; AOUT_CHAN_CENTER | AOUT_CHAN_LFE |
case 2: AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT |
default: AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT;
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT; break;
case 2:
default:
p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
}
} }
break; break;
} }
......
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