Commit 030238bb authored by Max Kellermann's avatar Max Kellermann

audio: removed variable "audioOpened"

This variable is never read, and can be removed.
parent b9677020
...@@ -45,8 +45,6 @@ static unsigned int audioOutputArraySize; ...@@ -45,8 +45,6 @@ static unsigned int audioOutputArraySize;
*/ */
static bool *audioDeviceStates; static bool *audioDeviceStates;
static uint8_t audioOpened;
static unsigned int audio_output_count(void) static unsigned int audio_output_count(void)
{ {
unsigned int nr = 0; unsigned int nr = 0;
...@@ -315,15 +313,11 @@ int openAudioDevice(const struct audio_format *audioFormat) ...@@ -315,15 +313,11 @@ int openAudioDevice(const struct audio_format *audioFormat)
ret = 0; ret = 0;
} }
if (ret == 0) if (ret != 0) {
audioOpened = 1;
else {
/* close all devices if there was an error */ /* close all devices if there was an error */
for (i = 0; i < audioOutputArraySize; ++i) { for (i = 0; i < audioOutputArraySize; ++i) {
audio_output_close(&audioOutputArray[i]); audio_output_close(&audioOutputArray[i]);
} }
audioOpened = 0;
} }
return ret; return ret;
...@@ -362,8 +356,6 @@ void closeAudioDevice(void) ...@@ -362,8 +356,6 @@ void closeAudioDevice(void)
for (i = 0; i < audioOutputArraySize; ++i) for (i = 0; i < audioOutputArraySize; ++i)
audio_output_close(&audioOutputArray[i]); audio_output_close(&audioOutputArray[i]);
audioOpened = 0;
} }
void sendMetadataToAudioDevice(const struct tag *tag) void sendMetadataToAudioDevice(const struct tag *tag)
......
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