aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/audioOutput.h14
-rw-r--r--src/audioOutputs/audioOutput_alsa.c16
-rw-r--r--src/audioOutputs/audioOutput_ao.c15
-rw-r--r--src/audioOutputs/audioOutput_mvp.c16
-rw-r--r--src/audioOutputs/audioOutput_oss.c17
-rw-r--r--src/audioOutputs/audioOutput_osx.c15
-rw-r--r--src/audioOutputs/audioOutput_pulse.c12
-rw-r--r--src/audioOutputs/audioOutput_shout.c15
8 files changed, 26 insertions, 94 deletions
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 6e1416661..87e91f678 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -26,6 +26,18 @@
#include "tag.h"
#include "conf.h"
+#define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) \
+ AudioOutputPlugin plugin = { \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ NULL, \
+ };
+
typedef struct _AudioOutput AudioOutput;
typedef int (* AudioOutputTestDefaultDeviceFunc) ();
@@ -80,7 +92,7 @@ typedef struct _AudioOutputPlugin {
AudioOutputPlayFunc playFunc;
AudioOutputDropBufferedAudioFunc dropBufferedAudioFunc;
AudioOutputCloseDeviceFunc closeDeviceFunc;
- AudioOutputSendMetadataFunc sendMetdataFunc;
+ AudioOutputSendMetadataFunc sendMetdataFunc;
} AudioOutputPlugin;
void initAudioOutputPlugins();
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index fc4b7646d..080e4ccd3 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -371,23 +371,11 @@ AudioOutputPlugin alsaPlugin =
alsa_playAudio,
alsa_dropBufferedAudio,
alsa_closeDevice,
- NULL /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else /* HAVE ALSA */
-AudioOutputPlugin alsaPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL /* sendMetadataFunc */
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(alsaPlugin)
#endif /* HAVE_ALSA */
-
-
diff --git a/src/audioOutputs/audioOutput_ao.c b/src/audioOutputs/audioOutput_ao.c
index d198a8e1b..1df7a5f3e 100644
--- a/src/audioOutputs/audioOutput_ao.c
+++ b/src/audioOutputs/audioOutput_ao.c
@@ -244,24 +244,13 @@ AudioOutputPlugin aoPlugin =
audioOutputAo_play,
audioOutputAo_dropBufferedAudio,
audioOutputAo_closeDevice,
- NULL /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else
#include <stdio.h>
-AudioOutputPlugin aoPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(aoPlugin)
#endif
diff --git a/src/audioOutputs/audioOutput_mvp.c b/src/audioOutputs/audioOutput_mvp.c
index b8688836c..0b4c55f42 100644
--- a/src/audioOutputs/audioOutput_mvp.c
+++ b/src/audioOutputs/audioOutput_mvp.c
@@ -274,23 +274,11 @@ AudioOutputPlugin mvpPlugin =
mvp_playAudio,
mvp_dropBufferedAudio,
mvp_closeDevice,
- NULL /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else /* HAVE_MVP */
-AudioOutputPlugin mvpPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL /* sendMetadataFunc */
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(mvpPlugin)
#endif /* HAVE_MVP */
-
diff --git a/src/audioOutputs/audioOutput_oss.c b/src/audioOutputs/audioOutput_oss.c
index 83273d510..3f11adb0c 100644
--- a/src/audioOutputs/audioOutput_oss.c
+++ b/src/audioOutputs/audioOutput_oss.c
@@ -555,24 +555,11 @@ AudioOutputPlugin ossPlugin =
oss_playAudio,
oss_dropBufferedAudio,
oss_closeDevice,
- NULL /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else /* HAVE OSS */
-AudioOutputPlugin ossPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL /* sendMetadataFunc */
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(ossPlugin)
#endif /* HAVE_OSS */
-
-
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c
index bcf9e453c..8b0f5a9a6 100644
--- a/src/audioOutputs/audioOutput_osx.c
+++ b/src/audioOutputs/audioOutput_osx.c
@@ -351,24 +351,13 @@ AudioOutputPlugin osxPlugin =
osx_play,
osx_dropBufferedAudio,
osx_closeDevice,
- NULL /* sendMetadataFunc */
+ NULL, /* sendMetadataFunc */
};
#else
#include <stdio.h>
-AudioOutputPlugin osxPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(osxPlugin)
#endif
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c
index 0943c530f..d2a794429 100644
--- a/src/audioOutputs/audioOutput_pulse.c
+++ b/src/audioOutputs/audioOutput_pulse.c
@@ -196,16 +196,6 @@ AudioOutputPlugin pulsePlugin = {
#else /* HAVE_PULSE */
-AudioOutputPlugin pulsePlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(pulsePlugin)
#endif /* HAVE_PULSE */
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 0196f3264..b1586f6be 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -604,22 +604,11 @@ AudioOutputPlugin shoutPlugin =
myShout_play,
myShout_dropBufferedAudio,
myShout_closeDevice,
- myShout_setTag
+ myShout_setTag,
};
#else
-AudioOutputPlugin shoutPlugin =
-{
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
+DISABLED_AUDIO_OUTPUT_PLUGIN(shoutPlugin)
#endif