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

Support up to 9 channel with Vorbis

Patch from Pierre-Luc Beaudoin
parent 54668b79
...@@ -162,7 +162,8 @@ Paul Mackerras <paulus at linuxcare.com.au> - AltiVec IDCT and motion ...@@ -162,7 +162,8 @@ Paul Mackerras <paulus at linuxcare.com.au> - AltiVec IDCT and motion
Pavlov Konstantin “thresh” - several Linux build system fixes Pavlov Konstantin “thresh” - several Linux build system fixes
Petr Vacek - FTP cleartext authentication Petr Vacek - FTP cleartext authentication
Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch Philippe Van Hecke <philippe at belnet dot be> - SAP header hash patch
Pierre d'Herbemont <<pdherbemont at free dot fr> - Compile fix Pierre d'Herbemont <pdherbemont at free dot fr> - Compile fix
Pierre-Luc Beaudoin - Vorbis 9 channels patch
Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches Pierre Marc Dumuid <pierre.dumuid at adelaide dot edu dot au> - Playlist patches
Pittayakom Saingtong <develop5 qt datawiz dot co dot th> - Thai localisation Pittayakom Saingtong <develop5 qt datawiz dot co dot th> - Thai localisation
Rafaël Carré <funman at videolan org> - Audioscrobbler plugin, D-Bus control Rafaël Carré <funman at videolan org> - Audioscrobbler plugin, D-Bus control
......
/***************************************************************************** /*****************************************************************************
* vorbis.c: vorbis decoder/encoder/packetizer module making use of libvorbis. * vorbis.c: vorbis decoder/encoder/packetizer module using of libvorbis.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 the VideoLAN team * Copyright (C) 2001-2003 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux
*
* $Id$ * $Id$
* *
* Authors: Gildas Bazin <gbazin@videolan.org> * Authors: Gildas Bazin <gbazin@videolan.org>
...@@ -86,7 +89,7 @@ struct decoder_sys_t ...@@ -86,7 +89,7 @@ struct decoder_sys_t
int pi_chan_table[AOUT_CHAN_MAX]; int pi_chan_table[AOUT_CHAN_MAX];
}; };
static int pi_channels_maps[7] = static int pi_channels_maps[9] =
{ {
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_CENTER,
...@@ -97,7 +100,13 @@ static int pi_channels_maps[7] = ...@@ -97,7 +100,13 @@ static int pi_channels_maps[7] =
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT, | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_LFE,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
| AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT
| AOUT_CHAN_MIDDLERIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER | AOUT_CHAN_REARLEFT
| AOUT_CHAN_REARRIGHT | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT
| AOUT_CHAN_LFE
}; };
/* /*
...@@ -395,10 +404,9 @@ static int ProcessHeaders( decoder_t *p_dec ) ...@@ -395,10 +404,9 @@ static int ProcessHeaders( decoder_t *p_dec )
p_dec->fmt_out.audio.i_rate = p_sys->vi.rate; p_dec->fmt_out.audio.i_rate = p_sys->vi.rate;
p_dec->fmt_out.audio.i_channels = p_sys->vi.channels; p_dec->fmt_out.audio.i_channels = p_sys->vi.channels;
if( p_dec->fmt_out.audio.i_channels < 0 || if( p_dec->fmt_out.audio.i_channels > 9 )
p_dec->fmt_out.audio.i_channels > 6 )
{ {
msg_Err( p_dec, "invalid number of channels (not between 1 and 6): %i", msg_Err( p_dec, "invalid number of channels (not between 1 and 9): %i",
p_dec->fmt_out.audio.i_channels ); p_dec->fmt_out.audio.i_channels );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -409,7 +417,6 @@ static int ProcessHeaders( decoder_t *p_dec ) ...@@ -409,7 +417,6 @@ static int ProcessHeaders( decoder_t *p_dec )
p_dec->fmt_out.i_bitrate = p_sys->vi.bitrate_nominal; p_dec->fmt_out.i_bitrate = p_sys->vi.bitrate_nominal;
aout_DateInit( &p_sys->end_date, p_sys->vi.rate ); aout_DateInit( &p_sys->end_date, p_sys->vi.rate );
aout_DateSet( &p_sys->end_date, 0 );
msg_Dbg( p_dec, "channels:%d samplerate:%ld bitrate:%ld", msg_Dbg( p_dec, "channels:%d samplerate:%ld bitrate:%ld",
p_sys->vi.channels, p_sys->vi.rate, p_sys->vi.bitrate_nominal ); p_sys->vi.channels, p_sys->vi.rate, p_sys->vi.bitrate_nominal );
......
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