(closes #108).
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.36 2002/12/07 23:50:30 massiot Exp $
+ * $Id: aout_internal.h,v 1.37 2003/01/23 17:13:28 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
void (* pf_do_work)( struct aout_instance_t *,
struct aout_buffer_t * );
- /* If b_error == 1, there is no mixer nor audio output pipeline. */
+ /* If b_error == 1, there is no mixer. */
vlc_bool_t b_error;
/* Multiplier used to raise or lower the volume of the sound in
* software. Beware, this creates sound distortion and should be avoided
audio_volume_t i_volume;
/* Saved volume for aout_VolumeMute(). */
audio_volume_t i_saved_volume;
+
+ /* If b_error == 1, there is no audio output pipeline. */
+ vlc_bool_t b_error;
} aout_output_t;
/*****************************************************************************
/* From mixer.c : */
int aout_MixerNew( aout_instance_t * p_aout );
-int aout_MixerDelete( aout_instance_t * p_aout );
+void aout_MixerDelete( aout_instance_t * p_aout );
void aout_MixerRun( aout_instance_t * p_aout );
int aout_MixerMultiplierSet( aout_instance_t * p_aout, float f_multiplier );
int aout_MixerMultiplierGet( aout_instance_t * p_aout, float * pf_multiplier );
* common.c : audio output management of common data structures
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: common.c,v 1.15 2003/01/22 18:31:47 massiot Exp $
+ * $Id: common.c,v 1.16 2003/01/23 17:13:28 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_aout->i_nb_inputs = 0;
p_aout->mixer.f_multiplier = 1.0;
p_aout->mixer.b_error = 1;
+ p_aout->output.b_error = 1;
p_aout->output.b_starving = 1;
var_Create( p_aout, "intf-change", VLC_VAR_BOOL );
* mixer.c : audio output mixing operations
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: mixer.c,v 1.23 2003/01/06 22:07:47 massiot Exp $
+ * $Id: mixer.c,v 1.24 2003/01/23 17:13:28 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************
* Please note that you must hold the mixer lock.
*****************************************************************************/
-int aout_MixerDelete( aout_instance_t * p_aout )
+void aout_MixerDelete( aout_instance_t * p_aout )
{
- if ( p_aout->mixer.b_error ) return 0;
+ if ( p_aout->mixer.b_error ) return;
module_Unneed( p_aout, p_aout->mixer.p_module );
p_aout->mixer.b_error = 1;
-
- return 0;
}
/*****************************************************************************
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: output.c,v 1.32 2003/01/23 11:48:18 massiot Exp $
+ * $Id: output.c,v 1.33 2003/01/23 17:13:28 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_aout->output.i_nb_filters,
&p_aout->mixer.output_alloc );
+ p_aout->output.b_error = 0;
return 0;
}
*****************************************************************************/
void aout_OutputDelete( aout_instance_t * p_aout )
{
+ if ( p_aout->output.b_error ) return 0;
module_Unneed( p_aout, p_aout->output.p_module );
aout_FiltersDestroyPipeline( p_aout, p_aout->output.pp_filters,
p_aout->output.i_nb_filters );
aout_FifoDestroy( p_aout, &p_aout->output.fifo );
+
+ p_aout->output.b_error = 1;
}
/*****************************************************************************