* Fixed detection of VCD support under OS X.2.
16 files changed:
if test "x${SYS}" = "xdarwin"
then
if test "x${SYS}" = "xdarwin"
then
- # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
+ PLUGINS="${PLUGINS} vcd"
LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
fi
fi
LDFLAGS_vcd="${LDFLAGS_vcd} -framework IOKit -framework CoreFoundation"
fi
fi
* fixed32float32.c : converter from fixed32 to float32 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* fixed32float32.c : converter from fixed32 to float32 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: fixed32tofloat32.c,v 1.9 2002/09/30 21:32:32 massiot Exp $
+ * $Id: fixed32tofloat32.c,v 1.10 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer;
float * p_out = (float *)p_out_buf->p_buffer;
vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer;
float * p_out = (float *)p_out_buf->p_buffer;
- for ( i = p_in_buf->i_nb_samples * p_filter->input.i_channels ; i-- ; )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ) ; i-- ; )
{
*p_out++ = (float)*p_in++ / (float)FIXED32_ONE;
}
{
*p_out++ = (float)*p_in++ / (float)FIXED32_ONE;
}
* fixed32tos16.c : converter from fixed32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* fixed32tos16.c : converter from fixed32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: fixed32tos16.c,v 1.6 2002/09/30 21:32:32 massiot Exp $
+ * $Id: fixed32tos16.c,v 1.7 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
s16 sample;
// static struct audio_dither dither;
s16 sample;
// static struct audio_dither dither;
- for ( i = p_in_buf->i_nb_samples * p_filter->input.i_channels ; i-- ; )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ) ; i-- ; )
{
/* Accurate scaling */
// p_out = mpg321_s24_to_s16_pcm(16, *p_in++, &dither);
{
/* Accurate scaling */
// p_out = mpg321_s24_to_s16_pcm(16, *p_in++, &dither);
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32tos16.c,v 1.10 2002/09/30 21:32:32 massiot Exp $
+ * $Id: float32tos16.c,v 1.11 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
float * p_in = (float *)p_in_buf->p_buffer;
s16 * p_out = (s16 *)p_out_buf->p_buffer;
float * p_in = (float *)p_in_buf->p_buffer;
s16 * p_out = (s16 *)p_out_buf->p_buffer;
- for ( i = p_in_buf->i_nb_samples * p_filter->input.i_channels ; i-- ; )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ); i-- ; )
{
#if 0
/* Slow version. */
{
#if 0
/* Slow version. */
* float32tos8.c : converter from float32 to signed 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* float32tos8.c : converter from float32 to signed 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32tos8.c,v 1.5 2002/09/30 21:32:32 massiot Exp $
+ * $Id: float32tos8.c,v 1.6 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
float * p_in = (float *)p_in_buf->p_buffer;
s8 * p_out = (s8 *)p_out_buf->p_buffer;
float * p_in = (float *)p_in_buf->p_buffer;
s8 * p_out = (s8 *)p_out_buf->p_buffer;
- for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ); i-- ; )
{
if ( *p_in >= 1.0 ) *p_out = 127;
else if ( *p_in < -1.0 ) *p_out = -128;
{
if ( *p_in >= 1.0 ) *p_out = 127;
else if ( *p_in < -1.0 ) *p_out = -128;
* float32tou16.c : converter from float32 to unsigned 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* float32tou16.c : converter from float32 to unsigned 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32tou16.c,v 1.5 2002/09/30 21:32:32 massiot Exp $
+ * $Id: float32tou16.c,v 1.6 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
float * p_in = (float *)p_in_buf->p_buffer;
u16 * p_out = (u16 *)p_out_buf->p_buffer;
float * p_in = (float *)p_in_buf->p_buffer;
u16 * p_out = (u16 *)p_out_buf->p_buffer;
- for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ); i-- ; )
{
if ( *p_in >= 1.0 ) *p_out = 65535;
else if ( *p_in < -1.0 ) *p_out = 0;
{
if ( *p_in >= 1.0 ) *p_out = 65535;
else if ( *p_in < -1.0 ) *p_out = 0;
* float32tou8.c : converter from float32 to unsigned 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* float32tou8.c : converter from float32 to unsigned 8 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32tou8.c,v 1.5 2002/09/30 21:32:32 massiot Exp $
+ * $Id: float32tou8.c,v 1.6 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
*
* Authors: Xavier Maillard <zedek@fxgsproject.org>
*
float * p_in = (float *)p_in_buf->p_buffer;
u8 * p_out = (u8 *)p_out_buf->p_buffer;
float * p_in = (float *)p_in_buf->p_buffer;
u8 * p_out = (u8 *)p_out_buf->p_buffer;
- for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ )
+ for ( i = p_in_buf->i_nb_samples
+ * aout_FormatNbChannels( &p_filter->input ); i-- ; )
{
if ( *p_in >= 1.0 ) *p_out = 255;
else if ( *p_in < -1.0 ) *p_out = 0;
{
if ( *p_in >= 1.0 ) *p_out = 255;
else if ( *p_in < -1.0 ) *p_out = 0;
* s16tofloat32.c : converter from signed 16 bits integer to float32
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* s16tofloat32.c : converter from signed 16 bits integer to float32
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: s16tofloat32.c,v 1.3 2002/09/30 21:32:32 massiot Exp $
+ * $Id: s16tofloat32.c,v 1.4 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
- int i = p_in_buf->i_nb_samples * p_filter->input.i_channels;
+ int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
s16 * p_in = (s16 *)p_in_buf->p_buffer + i - 1;
/* We start from the end because b_in_place is true */
s16 * p_in = (s16 *)p_in_buf->p_buffer + i - 1;
* with endianness change
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* with endianness change
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: s16tofloat32swab.c,v 1.6 2002/09/30 21:32:32 massiot Exp $
+ * $Id: s16tofloat32swab.c,v 1.7 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
- int i = p_in_buf->i_nb_samples * p_filter->input.i_channels;
+ int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input );
/* We start from the end because b_in_place is true */
s16 * p_in;
/* We start from the end because b_in_place is true */
s16 * p_in;
* trivial.c : trivial resampler (skips samples or pads with zeroes)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* trivial.c : trivial resampler (skips samples or pads with zeroes)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.6 2002/09/30 21:32:32 massiot Exp $
+ * $Id: trivial.c,v 1.7 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
int i_in_nb = p_in_buf->i_nb_samples;
int i_out_nb = i_in_nb * p_filter->output.i_rate
/ p_filter->input.i_rate;
int i_in_nb = p_in_buf->i_nb_samples;
int i_out_nb = i_in_nb * p_filter->output.i_rate
/ p_filter->input.i_rate;
- int i_frame_bytes = p_filter->input.i_channels * sizeof(s32);
+ int i_frame_bytes = aout_FormatNbChannels( &p_filter->input ) * sizeof(s32);
if ( p_out_buf != p_in_buf )
{
if ( p_out_buf != p_in_buf )
{
* ugly.c : ugly resampler (changes pitch)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* ugly.c : ugly resampler (changes pitch)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: ugly.c,v 1.3 2002/09/30 21:32:32 massiot Exp $
+ * $Id: ugly.c,v 1.4 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
s32* p_in = (s32*)p_in_buf->p_buffer;
s32* p_out = (s32*)p_out_buf->p_buffer;
s32* p_in = (s32*)p_in_buf->p_buffer;
s32* p_out = (s32*)p_out_buf->p_buffer;
+ int i_nb_channels = aout_FormatNbChannels( &p_filter->input );
int i_in_nb = p_in_buf->i_nb_samples;
int i_out_nb = i_in_nb * p_filter->output.i_rate
/ p_filter->input.i_rate;
int i_in_nb = p_in_buf->i_nb_samples;
int i_out_nb = i_in_nb * p_filter->output.i_rate
/ p_filter->input.i_rate;
- int i_frame_bytes = p_filter->input.i_channels * sizeof(s32);
+ int i_frame_bytes = i_nb_channels * sizeof(s32);
int i_out, i_chan, i_remainder = 0;
for( i_out = i_out_nb ; i_out-- ; )
{
int i_out, i_chan, i_remainder = 0;
for( i_out = i_out_nb ; i_out-- ; )
{
- for( i_chan = p_filter->input.i_channels ; i_chan ; )
+ for( i_chan = i_nb_channels ; i_chan ; )
{
i_chan--;
p_out[i_chan] = p_in[i_chan];
}
{
i_chan--;
p_out[i_chan] = p_in[i_chan];
}
- p_out += p_filter->input.i_channels;
+ p_out += i_nb_channels;
i_remainder += p_filter->input.i_rate;
while( i_remainder >= p_filter->output.i_rate )
{
i_remainder += p_filter->input.i_rate;
while( i_remainder >= p_filter->output.i_rate )
{
- p_in += p_filter->input.i_channels;
i_remainder -= p_filter->output.i_rate;
}
}
i_remainder -= p_filter->output.i_rate;
}
}
* float32.c : precise float32 audio mixer implementation
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* float32.c : precise float32 audio mixer implementation
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32.c,v 1.5 2002/09/30 21:32:32 massiot Exp $
+ * $Id: float32.c,v 1.6 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
int i_nb_inputs = p_aout->i_nb_inputs;
float f_multiplier = p_aout->mixer.f_multiplier;
int i_input;
int i_nb_inputs = p_aout->i_nb_inputs;
float f_multiplier = p_aout->mixer.f_multiplier;
int i_input;
+ int i_nb_channels = aout_FormatNbChannels( &p_aout->mixer.mixer );
for ( i_input = 0; i_input < i_nb_inputs; i_input++ )
{
for ( i_input = 0; i_input < i_nb_inputs; i_input++ )
{
- int i_nb_words = p_buffer->i_nb_samples
- * p_aout->mixer.mixer.i_channels;
+ int i_nb_words = p_buffer->i_nb_samples * i_nb_channels;
aout_input_t * p_input = p_aout->pp_inputs[i_input];
float * p_out = (float *)p_buffer->p_buffer;
float * p_in = (float *)p_input->p_first_byte_to_mix;
aout_input_t * p_input = p_aout->pp_inputs[i_input];
float * p_out = (float *)p_buffer->p_buffer;
float * p_in = (float *)p_input->p_first_byte_to_mix;
ptrdiff_t i_available_words = (
(float *)p_input->fifo.p_first->p_buffer - p_in)
+ p_input->fifo.p_first->i_nb_samples
ptrdiff_t i_available_words = (
(float *)p_input->fifo.p_first->p_buffer - p_in)
+ p_input->fifo.p_first->i_nb_samples
- * p_aout->mixer.mixer.i_channels;
if ( i_available_words < i_nb_words )
{
if ( i_available_words < i_nb_words )
{
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: trivial.c,v 1.9 2002/09/30 21:32:32 massiot Exp $
+ * $Id: trivial.c,v 1.10 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
{
int i = 0;
aout_input_t * p_input = p_aout->pp_inputs[i];
{
int i = 0;
aout_input_t * p_input = p_aout->pp_inputs[i];
+ int i_nb_channels = aout_FormatNbChannels( &p_aout->mixer.mixer );
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(s32)
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(s32)
- * p_aout->mixer.mixer.i_channels;
byte_t * p_in;
byte_t * p_out;
byte_t * p_in;
byte_t * p_out;
- p_in)
+ p_input->fifo.p_first->i_nb_samples
* sizeof(s32)
- p_in)
+ p_input->fifo.p_first->i_nb_samples
* sizeof(s32)
- * p_aout->mixer.mixer.i_channels;
if ( i_available_bytes < i_nb_bytes )
{
if ( i_available_bytes < i_nb_bytes )
{
* lpcm.c: lpcm decoder module
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* lpcm.c: lpcm decoder module
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: lpcm.c,v 1.4 2002/09/30 21:32:32 massiot Exp $
+ * $Id: lpcm.c,v 1.5 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
/* FIXME : I suppose the number of channel and sampling rate
* are somewhere in the headers */
p_dec->output_format.i_format = VLC_FOURCC('s','1','6','b');
/* FIXME : I suppose the number of channel and sampling rate
* are somewhere in the headers */
p_dec->output_format.i_format = VLC_FOURCC('s','1','6','b');
- p_dec->output_format.i_channels = 2;
+ p_dec->output_format.i_channels = AOUT_CHAN_STEREO;
p_dec->output_format.i_rate = 48000;
aout_DateInit( &p_dec->end_date, 48000 );
p_dec->output_format.i_rate = 48000;
aout_DateInit( &p_dec->end_date, 48000 );
mad_fixed_t const * p_right = p_pcm->samples[1];
int i_samples = p_pcm->length;
mad_fixed_t * p_samples;
mad_fixed_t const * p_right = p_pcm->samples[1];
int i_samples = p_pcm->length;
mad_fixed_t * p_samples;
+ int i_channels = (p_pcm->channels == 2) ? AOUT_CHAN_STEREO :
+ AOUT_CHAN_MONO;
/* Creating the audio output fifo. Assume the samplerate and nr of channels
* from the first decoded frame is right for the entire audio track. */
if( (p_dec->p_aout_input != NULL) &&
(p_dec->output_format.i_rate != p_pcm->samplerate
/* Creating the audio output fifo. Assume the samplerate and nr of channels
* from the first decoded frame is right for the entire audio track. */
if( (p_dec->p_aout_input != NULL) &&
(p_dec->output_format.i_rate != p_pcm->samplerate
- || p_dec->output_format.i_channels != p_pcm->channels) )
+ || p_dec->output_format.i_channels != i_channels) )
{
/* Parameters changed - this should not happen. */
aout_DecDelete( p_dec->p_aout, p_dec->p_aout_input );
{
/* Parameters changed - this should not happen. */
aout_DecDelete( p_dec->p_aout, p_dec->p_aout_input );
if( p_dec->p_aout_input == NULL )
{
p_dec->output_format.i_rate = p_pcm->samplerate;
if( p_dec->p_aout_input == NULL )
{
p_dec->output_format.i_rate = p_pcm->samplerate;
- p_dec->output_format.i_channels = p_pcm->channels;
+ p_dec->output_format.i_channels = i_channels;
aout_DateInit( &p_dec->end_date, p_pcm->samplerate );
p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
&p_dec->p_aout,
aout_DateInit( &p_dec->end_date, p_pcm->samplerate );
p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
&p_dec->p_aout,
* decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: decoder.c,v 1.5 2002/09/30 21:32:32 massiot Exp $
+ * $Id: decoder.c,v 1.6 2002/10/15 23:10:54 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
if( !adec_SyncFrame( p_dec, &sync_info ) )
{
/* Create the output fifo if it doesn't exist yet */
if( !adec_SyncFrame( p_dec, &sync_info ) )
{
/* Create the output fifo if it doesn't exist yet */
- if( ( p_dec->p_aout_input == NULL )||
- ( p_dec->output_format.i_channels != ( sync_info.b_stereo ? 2 : 1 ) )||
+ if( ( p_dec->p_aout_input == NULL ) ||
+ ( p_dec->output_format.i_channels !=
+ ( sync_info.b_stereo ? AOUT_CHAN_STEREO : AOUT_CHAN_MONO ) ) ||
( p_dec->output_format.i_rate != sync_info.sample_rate ) )
{
if( p_dec->p_aout_input )
( p_dec->output_format.i_rate != sync_info.sample_rate ) )
{
if( p_dec->p_aout_input )
/* Set output configuration */
p_dec->output_format.i_format = VLC_FOURCC('f','l','3','2');
/* Set output configuration */
p_dec->output_format.i_format = VLC_FOURCC('f','l','3','2');
- p_dec->output_format.i_channels = ( sync_info.b_stereo ? 2 : 1 );
+ p_dec->output_format.i_channels =
+ ( sync_info.b_stereo ? AOUT_CHAN_STEREO : AOUT_CHAN_MONO );
p_dec->output_format.i_rate = sync_info.sample_rate;
aout_DateInit( &p_dec->end_date, sync_info.sample_rate );
p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
p_dec->output_format.i_rate = sync_info.sample_rate;
aout_DateInit( &p_dec->end_date, sync_info.sample_rate );
p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,