Committing qball's patch to list supported audio outputs in --version
git-svn-id: https://svn.musicpd.org/mpd/trunk@4357 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
5070f8bc78
commit
b38157fc76
13
src/audio.c
13
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;
|
||||
|
||||
|
|
|
@ -79,4 +79,5 @@ void readAudioDevicesState();
|
|||
|
||||
void saveAudioDevicesState();
|
||||
|
||||
void loadAudioDrivers();
|
||||
#endif
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue