aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audio.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/audio.c b/src/audio.c
index b539d6f7c..cea5a5a93 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -19,9 +19,7 @@
#include "audio.h"
#include "audioOutput.h"
#include "log.h"
-#include "command.h"
#include "path.h"
-#include "ack.h"
#include "myfprintf.h"
#include "os_compat.h"
@@ -428,13 +426,10 @@ void sendMetadataToAudioDevice(const struct tag *tag)
}
}
-int enableAudioDevice(int fd, unsigned int device)
+int enableAudioDevice(unsigned int device)
{
- if (device >= audioOutputArraySize) {
- commandError(fd, ACK_ERROR_ARG, "audio output device id %i "
- "doesn't exist\n", device);
+ if (device >= audioOutputArraySize)
return -1;
- }
if (!(audioDeviceStates[device] & 0x01))
audioDeviceStates[device] = DEVICE_ENABLE;
@@ -442,13 +437,11 @@ int enableAudioDevice(int fd, unsigned int device)
return 0;
}
-int disableAudioDevice(int fd, unsigned int device)
+int disableAudioDevice(unsigned int device)
{
- if (device >= audioOutputArraySize) {
- commandError(fd, ACK_ERROR_ARG, "audio output device id %i "
- "doesn't exist\n", device);
+ if (device >= audioOutputArraySize)
return -1;
- }
+
if (audioDeviceStates[device] & 0x01)
audioDeviceStates[device] = DEVICE_DISABLE;