vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Apr 3 17:56:57 2011 +0300| [a6274616f21886a1b025c62ac0bca30b165d3db8] | committer: Rémi Denis-Courmont
PulseAudio: fix channels map order (untested) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6274616f21886a1b025c62ac0bca30b165d3db8 --- modules/audio_output/pulse.c | 31 ++++++++++++++----------------- 1 files changed, 14 insertions(+), 17 deletions(-) diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c index e1b84d6..afbc2ef 100644 --- a/modules/audio_output/pulse.c +++ b/modules/audio_output/pulse.c @@ -295,34 +295,31 @@ static int Open(vlc_object_t *obj) return VLC_EGENERIC; } - /* Channel mapping */ + /* Channel mapping (order defined in vlc_aout.h) */ struct pa_channel_map map; map.channels = 0; - if (aout->output.output.i_physical_channels & AOUT_CHAN_CENTER) - { - if (ss.channels == 1) - map.map[map.channels++] = PA_CHANNEL_POSITION_MONO; - else - map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_CENTER; - } if (aout->output.output.i_physical_channels & AOUT_CHAN_LEFT) map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_LEFT; if (aout->output.output.i_physical_channels & AOUT_CHAN_RIGHT) map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_RIGHT; - - if (aout->output.output.i_physical_channels & AOUT_CHAN_REARCENTER) - map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_CENTER; - if (aout->output.output.i_physical_channels & AOUT_CHAN_REARLEFT) - map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_LEFT; - if (aout->output.output.i_physical_channels & AOUT_CHAN_REARRIGHT) - map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_RIGHT; - if (aout->output.output.i_physical_channels & AOUT_CHAN_MIDDLELEFT) map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER; if (aout->output.output.i_physical_channels & AOUT_CHAN_MIDDLERIGHT) map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER; - + if (aout->output.output.i_physical_channels & AOUT_CHAN_REARLEFT) + map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_LEFT; + if (aout->output.output.i_physical_channels & AOUT_CHAN_REARRIGHT) + map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_RIGHT; + if (aout->output.output.i_physical_channels & AOUT_CHAN_REARCENTER) + map.map[map.channels++] = PA_CHANNEL_POSITION_REAR_CENTER; + if (aout->output.output.i_physical_channels & AOUT_CHAN_CENTER) + { + if (ss.channels == 1) + map.map[map.channels++] = PA_CHANNEL_POSITION_MONO; + else + map.map[map.channels++] = PA_CHANNEL_POSITION_FRONT_CENTER; + } if (aout->output.output.i_physical_channels & AOUT_CHAN_LFE) map.map[map.channels++] = PA_CHANNEL_POSITION_LFE; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
