aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio.c13
-rw-r--r--src/audio.h1
-rw-r--r--src/audioOutput.c12
-rw-r--r--src/audioOutput.h1
-rw-r--r--src/main.c6
5 files changed, 29 insertions, 4 deletions
diff --git a/src/audio.c b/src/audio.c
index da2a20c80..6766159b2 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -79,11 +79,8 @@ extern AudioOutputPlugin pulsePlugin;
extern AudioOutputPlugin mvpPlugin;
extern AudioOutputPlugin shoutPlugin;
-/* make sure initPlayerData is called before this function!! */
-void initAudioDriver() {
- ConfigParam * param = NULL;
- int i;
+void loadAudioDrivers() {
initAudioOutputPlugins();
loadAudioOutputPlugin(&alsaPlugin);
loadAudioOutputPlugin(&aoPlugin);
@@ -92,6 +89,14 @@ void initAudioDriver() {
loadAudioOutputPlugin(&pulsePlugin);
loadAudioOutputPlugin(&mvpPlugin);
loadAudioOutputPlugin(&shoutPlugin);
+}
+
+/* make sure initPlayerData is called before this function!! */
+void initAudioDriver() {
+ ConfigParam * param = NULL;
+ int i;
+
+ loadAudioDrivers();
pdAudioDevicesEnabled = (getPlayerData())->audioDeviceEnabled;
diff --git a/src/audio.h b/src/audio.h
index 810f36110..8978615ce 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -79,4 +79,5 @@ void readAudioDevicesState();
void saveAudioDevicesState();
+void loadAudioDrivers();
#endif
diff --git a/src/audioOutput.c b/src/audioOutput.c
index fea4609a6..e3bd68c4f 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -247,3 +247,15 @@ void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag) {
if(!audioOutput->sendMetdataFunc) return;
audioOutput->sendMetdataFunc(audioOutput, tag);
}
+
+void printAllOutputPluginTypes(FILE *fp) {
+ ListNode *node = audioOutputPluginList->firstNode;
+ AudioOutputPlugin *plugin;
+
+ while(node) {
+ plugin = (AudioOutputPlugin *)node->data;
+ myfprintf(fp, "%s ", plugin->name);
+ node = node->nextNode;
+ }
+ myfprintf(fp, "\n");
+}
diff --git a/src/audioOutput.h b/src/audioOutput.h
index 870a4760f..98e29d5ef 100644
--- a/src/audioOutput.h
+++ b/src/audioOutput.h
@@ -110,4 +110,5 @@ void finishAudioOutput(AudioOutput * audioOutput);
int keepAudioOutputAlive(AudioOutput * audioOutput, int ms);
void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag);
+void printAllOutputPluginTypes(FILE *fp);
#endif
diff --git a/src/main.c b/src/main.c
index 321f561af..bd94f4344 100644
--- a/src/main.c
+++ b/src/main.c
@@ -33,6 +33,7 @@
#include "permission.h"
#include "replayGain.h"
#include "inputPlugin.h"
+#include "audioOutput.h"
#include "inputStream.h"
#include "tag.h"
#include "tagTracker.h"
@@ -135,6 +136,11 @@ static void version(void) {
initInputPlugins();
printAllInputPluginSuffixes(stdout);
+
+ LOG("\n");
+ LOG("Supported outputs:\n");
+ loadAudioDrivers();
+ printAllOutputPluginTypes(stdout);
}
static void parseOptions(int argc, char ** argv, Options * options) {