Commit 42c78694 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/vorbis.c, modules/audio_filter/resampler/linear.c: adapted to
   the new changes in aout3.
parent fc6ea050
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* linear.c : linear interpolation resampler * linear.c : linear interpolation resampler
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: linear.c,v 1.4 2002/11/11 22:27:01 gbazin Exp $ * $Id: linear.c,v 1.5 2002/11/15 00:41:00 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Sigmund Augdal <sigmunau@idi.ntnu.no> * Sigmund Augdal <sigmunau@idi.ntnu.no>
...@@ -70,7 +70,10 @@ static int Create( vlc_object_t *p_this ) ...@@ -70,7 +70,10 @@ static int Create( vlc_object_t *p_this )
aout_filter_t * p_filter = (aout_filter_t *)p_this; aout_filter_t * p_filter = (aout_filter_t *)p_this;
if ( p_filter->input.i_rate == p_filter->output.i_rate if ( p_filter->input.i_rate == p_filter->output.i_rate
|| p_filter->input.i_format != p_filter->output.i_format || p_filter->input.i_format != p_filter->output.i_format
|| p_filter->input.i_channels != p_filter->output.i_channels || p_filter->input.i_physical_channels
!= p_filter->output.i_physical_channels
|| p_filter->input.i_original_channels
!= p_filter->output.i_original_channels
|| p_filter->input.i_format != VLC_FOURCC('f','l','3','2') ) || p_filter->input.i_format != VLC_FOURCC('f','l','3','2') )
{ {
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -83,8 +86,8 @@ static int Create( vlc_object_t *p_this ) ...@@ -83,8 +86,8 @@ static int Create( vlc_object_t *p_this )
msg_Err( p_filter, "out of memory" ); msg_Err( p_filter, "out of memory" );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
p_filter->p_sys->p_prev_sample = malloc( p_filter->input.i_channels p_filter->p_sys->p_prev_sample = malloc(
* sizeof(int32_t) ); p_filter->input.i_physical_channels * sizeof(int32_t) );
if( p_filter->p_sys->p_prev_sample == NULL ) if( p_filter->p_sys->p_prev_sample == NULL )
{ {
msg_Err( p_filter, "out of memory" ); msg_Err( p_filter, "out of memory" );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vorbis.c: vorbis decoder module making use of libvorbis. * vorbis.c: vorbis decoder module making use of libvorbis.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: vorbis.c,v 1.5 2002/11/14 22:38:47 massiot Exp $ * $Id: vorbis.c,v 1.6 2002/11/15 00:41:00 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -79,7 +79,8 @@ static int pi_channels_maps[6] = ...@@ -79,7 +79,8 @@ static int pi_channels_maps[6] =
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, AOUT_CHAN_CENTER, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
AOUT_CHAN_CENTER | AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT, AOUT_CHAN_CENTER | AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT, AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | 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_REARLEFT | AOUT_CHAN_REARRIGHT
}; };
...@@ -184,7 +185,9 @@ static int RunDecoder( decoder_fifo_t * p_fifo ) ...@@ -184,7 +185,9 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
vorbis_block_init( &p_dec->vd, &p_dec->vb ); vorbis_block_init( &p_dec->vd, &p_dec->vb );
p_dec->output_format.i_format = VLC_FOURCC('f','l','3','2'); p_dec->output_format.i_format = VLC_FOURCC('f','l','3','2');
p_dec->output_format.i_channels = pi_channels_maps[p_dec->vi.channels]; p_dec->output_format.i_physical_channels =
p_dec->output_format.i_original_channels =
pi_channels_maps[p_dec->vi.channels];
p_dec->output_format.i_rate = p_dec->vi.rate; p_dec->output_format.i_rate = p_dec->vi.rate;
aout_DateInit( &p_dec->end_date, p_dec->vi.rate ); aout_DateInit( &p_dec->end_date, p_dec->vi.rate );
......
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