aout: lack of software mixer is non fatal

This commit is contained in:
Rémi Denis-Courmont 2011-08-08 18:02:18 +03:00
parent bc9282fc3b
commit 7c7f4ce035
2 changed files with 2 additions and 13 deletions

View File

@ -103,11 +103,6 @@ int aout_DecNew( audio_output_t *p_aout,
assert (owner->volume.mixer == NULL);
owner->volume.mixer = aout_MixerNew (p_aout, owner->mixer_format.i_format);
if (owner->volume.mixer == NULL)
{
aout_OutputDelete( p_aout );
goto error;
}
date_Init (&owner->sync.date, owner->mixer_format.i_rate, 1);
date_Set (&owner->sync.date, VLC_TS_INVALID);
@ -168,17 +163,11 @@ static void aout_CheckRestart (audio_output_t *aout)
if (aout_OutputNew (aout, &input->input))
{
error:
input->b_error = true;
return; /* we are officially screwed */
}
owner->volume.mixer = aout_MixerNew (aout, owner->mixer_format.i_format);
if (owner->volume.mixer == NULL)
{
aout_OutputDelete (aout);
goto error;
}
if (aout_InputNew (aout, input, &input->request_vout))
assert (input->b_error);

View File

@ -51,7 +51,6 @@ audio_mixer_t *aout_MixerNew(vlc_object_t *obj, vlc_fourcc_t format)
mixer->module = module_need(mixer, "audio mixer", NULL, false);
if (mixer->module == NULL)
{
msg_Err(mixer, "no suitable audio mixer");
vlc_object_release(mixer);
mixer = NULL;
}
@ -75,5 +74,6 @@ void aout_MixerDelete(audio_mixer_t *mixer)
*/
void aout_MixerRun(audio_mixer_t *mixer, block_t *block, float amp)
{
mixer->mix(mixer, block, amp);
if (mixer != NULL)
mixer->mix(mixer, block, amp);
}