aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-02 23:08:00 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-02 23:08:00 +0000
commit78c5d884d2c687034d18e4cb77c7c116e1c97b84 (patch)
treeb03bb3b356709672de05453ff1e8c48e02286015 /src/audio.c
parent44eb26c16fb66908f75d395e63a16c343c28e00d (diff)
downloadmpd-78c5d884d2c687034d18e4cb77c7c116e1c97b84.tar.gz
mpd-78c5d884d2c687034d18e4cb77c7c116e1c97b84.tar.xz
mpd-78c5d884d2c687034d18e4cb77c7c116e1c97b84.zip
new command "devices", prints devices and their states
git-svn-id: https://svn.musicpd.org/mpd/trunk@2486 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audio.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/audio.c b/src/audio.c
index 01c883d6c..24d815961 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -197,9 +197,7 @@ void finishAudioDriver() {
free(audioOutputArray);
audioOutputArray = NULL;
- /* don't set to zero cause we're gonna use this for enabling
- and disabling devices */
- /*audioOutputArraySize = 0;*/
+ audioOutputArraySize = 0;
}
int isCurrentAudioFormat(AudioFormat * audioFormat) {
@@ -318,3 +316,14 @@ int disableAudioDevice(FILE * fp, int device) {
return 0;
}
+
+void printAudioDevices(FILE * fp) {
+ int i;
+
+ for(i = 0; i < audioOutputArraySize; i++) {
+ myfprintf(fp, "deviceid: %i\n", i);
+ myfprintf(fp, "devicename: %s\n", audioOutputArray[i]->name);
+ myfprintf(fp, "deviceenabled: %i\n",
+ (int)pdAudioDevicesEnabled[i]);
+ }
+}