From 2403d32a5007572f853c7782957f86aedf3d3aff Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 24 Sep 2008 07:20:36 +0200 Subject: output: set audio_output->open=1 in audio_output_task() Since the output plugin returns a value indicating success or error, we can have the output core code assign the "open" flag. --- src/audioOutputs/audioOutput_alsa.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/audioOutputs/audioOutput_alsa.c') diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index b2e4b9025..b6d00f176 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -292,8 +292,6 @@ configure_hw: ad->sampleSize = audio_format_sample_size(audioFormat) * audioFormat->channels; - audioOutput->open = 1; - DEBUG("ALSA device \"%s\" will be playing %i bit, %i channel audio at " "%i Hz\n", ad->device, (int)audioFormat->bits, channels, sampleRate); @@ -312,7 +310,6 @@ fail: if (ad->pcmHandle) snd_pcm_close(ad->pcmHandle); ad->pcmHandle = NULL; - audioOutput->open = 0; return -1; } @@ -372,8 +369,6 @@ static void alsa_closeDevice(struct audio_output *audioOutput) snd_pcm_close(ad->pcmHandle); ad->pcmHandle = NULL; } - - audioOutput->open = 0; } static int alsa_playAudio(struct audio_output *audioOutput, -- cgit v1.2.3