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:
13
src/audio.c
13
src/audio.c
@@ -79,11 +79,8 @@ extern AudioOutputPlugin pulsePlugin;
|
|||||||
extern AudioOutputPlugin mvpPlugin;
|
extern AudioOutputPlugin mvpPlugin;
|
||||||
extern AudioOutputPlugin shoutPlugin;
|
extern AudioOutputPlugin shoutPlugin;
|
||||||
|
|
||||||
/* make sure initPlayerData is called before this function!! */
|
|
||||||
void initAudioDriver() {
|
|
||||||
ConfigParam * param = NULL;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
|
void loadAudioDrivers() {
|
||||||
initAudioOutputPlugins();
|
initAudioOutputPlugins();
|
||||||
loadAudioOutputPlugin(&alsaPlugin);
|
loadAudioOutputPlugin(&alsaPlugin);
|
||||||
loadAudioOutputPlugin(&aoPlugin);
|
loadAudioOutputPlugin(&aoPlugin);
|
||||||
@@ -92,6 +89,14 @@ void initAudioDriver() {
|
|||||||
loadAudioOutputPlugin(&pulsePlugin);
|
loadAudioOutputPlugin(&pulsePlugin);
|
||||||
loadAudioOutputPlugin(&mvpPlugin);
|
loadAudioOutputPlugin(&mvpPlugin);
|
||||||
loadAudioOutputPlugin(&shoutPlugin);
|
loadAudioOutputPlugin(&shoutPlugin);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* make sure initPlayerData is called before this function!! */
|
||||||
|
void initAudioDriver() {
|
||||||
|
ConfigParam * param = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
loadAudioDrivers();
|
||||||
|
|
||||||
pdAudioDevicesEnabled = (getPlayerData())->audioDeviceEnabled;
|
pdAudioDevicesEnabled = (getPlayerData())->audioDeviceEnabled;
|
||||||
|
|
||||||
|
@@ -79,4 +79,5 @@ void readAudioDevicesState();
|
|||||||
|
|
||||||
void saveAudioDevicesState();
|
void saveAudioDevicesState();
|
||||||
|
|
||||||
|
void loadAudioDrivers();
|
||||||
#endif
|
#endif
|
||||||
|
@@ -247,3 +247,15 @@ void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag) {
|
|||||||
if(!audioOutput->sendMetdataFunc) return;
|
if(!audioOutput->sendMetdataFunc) return;
|
||||||
audioOutput->sendMetdataFunc(audioOutput, tag);
|
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);
|
int keepAudioOutputAlive(AudioOutput * audioOutput, int ms);
|
||||||
void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag);
|
void sendMetadataToAudioOutput(AudioOutput * audioOutput, MpdTag * tag);
|
||||||
|
|
||||||
|
void printAllOutputPluginTypes(FILE *fp);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "permission.h"
|
#include "permission.h"
|
||||||
#include "replayGain.h"
|
#include "replayGain.h"
|
||||||
#include "inputPlugin.h"
|
#include "inputPlugin.h"
|
||||||
|
#include "audioOutput.h"
|
||||||
#include "inputStream.h"
|
#include "inputStream.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "tagTracker.h"
|
#include "tagTracker.h"
|
||||||
@@ -135,6 +136,11 @@ static void version(void) {
|
|||||||
|
|
||||||
initInputPlugins();
|
initInputPlugins();
|
||||||
printAllInputPluginSuffixes(stdout);
|
printAllInputPluginSuffixes(stdout);
|
||||||
|
|
||||||
|
LOG("\n");
|
||||||
|
LOG("Supported outputs:\n");
|
||||||
|
loadAudioDrivers();
|
||||||
|
printAllOutputPluginTypes(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void parseOptions(int argc, char ** argv, Options * options) {
|
static void parseOptions(int argc, char ** argv, Options * options) {
|
||||||
|
Reference in New Issue
Block a user