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

aout: remove dead recycling code

parent 78d846a4
......@@ -171,7 +171,6 @@ bool aout_DecIsEmpty(audio_output_t *);
void aout_InputRequestRestart(audio_output_t *);
void aout_RequestRestart(audio_output_t *);
void aout_Shutdown (audio_output_t *);
/* Audio output locking */
static inline void aout_lock( audio_output_t *p_aout )
......
......@@ -184,8 +184,7 @@ void aout_Destroy (audio_output_t *aout)
{
aout_owner_t *owner = aout_owner (aout);
if (owner->module != NULL)
aout_Shutdown (aout);
assert (owner->module == NULL);
var_DelCallback (aout, "mute", var_Copy, aout->p_parent);
var_SetFloat (aout, "volume", -1.f);
......
......@@ -67,22 +67,6 @@ int aout_DecNew( audio_output_t *p_aout,
}
aout_owner_t *owner = aout_owner(p_aout);
#ifdef RECYCLE
/* Calling decoder is responsible for serializing aout_DecNew() and
* aout_DecDelete(). So no need to lock to _read_ those properties. */
if (owner->module != NULL) /* <- output exists */
{ /* Check if we can recycle the existing output and pipelines */
if (AOUT_FMTS_IDENTICAL(&owner->input_format, p_format))
return 0;
/* TODO? If the new input format is closer to the output format than
* the old input format was, then the output could be recycled. The
* input pipeline however would need to be restarted. */
/* No recycling: delete everything and restart from scratch */
aout_Shutdown (p_aout);
}
#endif
int ret = 0;
/* TODO: reduce lock scope depending on decoder's real need */
......@@ -121,7 +105,7 @@ error:
/**
* Stops all plugins involved in the audio output.
*/
void aout_Shutdown (audio_output_t *p_aout)
void aout_DecDelete (audio_output_t *p_aout)
{
aout_owner_t *owner = aout_owner (p_aout);
aout_input_t *input;
......@@ -145,19 +129,6 @@ void aout_Shutdown (audio_output_t *p_aout)
free (input);
}
/**
* Stops the decoded audio input.
* @note Due to output recycling, this function is esssentially a stub.
*/
void aout_DecDelete (audio_output_t *aout)
{
#ifdef RECYCLE
(void) aout;
#else
aout_Shutdown (aout);
#endif
}
#define AOUT_RESTART_OUTPUT 1
#define AOUT_RESTART_INPUT 2
static void aout_CheckRestart (audio_output_t *aout)
......
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