Commit e7505381 authored by Max Kellermann's avatar Max Kellermann

audio: moved protocol code to output_print.c

parent 49ff2ace
......@@ -42,6 +42,7 @@ mpd_headers = \
output_thread.h \
output_control.h \
output_state.h \
output_print.h \
output/shout_plugin.h \
buffer2array.h \
command.h \
......@@ -140,6 +141,7 @@ mpd_SOURCES = \
output_thread.c \
output_control.c \
output_state.c \
output_print.c \
output_init.c \
output/null_plugin.c \
buffer2array.c \
......
......@@ -22,7 +22,6 @@
#include "output_control.h"
#include "output_internal.h"
#include "path.h"
#include "client.h"
#include "idle.h"
#include "mixer_api.h"
......@@ -381,21 +380,6 @@ int disableAudioDevice(unsigned int device)
return 0;
}
void printAudioDevices(struct client *client)
{
unsigned int i;
for (i = 0; i < audioOutputArraySize; i++) {
client_printf(client,
"outputid: %i\n"
"outputname: %s\n"
"outputenabled: %i\n",
i,
audioOutputArray[i].name,
audioOutputArray[i].enabled);
}
}
bool mixer_control_setvol(unsigned int device, int volume, int rel)
{
struct audio_output *output;
......
......@@ -26,7 +26,6 @@
struct audio_format;
struct tag;
struct client;
struct config_param;
/**
......@@ -80,8 +79,6 @@ int enableAudioDevice(unsigned int device);
int disableAudioDevice(unsigned int device);
void printAudioDevices(struct client *client);
bool mixer_control_setvol(unsigned int device, int volume, int rel);
bool mixer_control_getvol(unsigned int device, int *volume);
......
......@@ -35,6 +35,7 @@
#include "stored_playlist.h"
#include "ack.h"
#include "audio.h"
#include "output_print.h"
#include "locate.h"
#include "dbUtils.h"
#include "tag.h"
......
/*
* Copyright (C) 2003-2009 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Protocol specific code for the audio output library.
*
*/
#include "output_print.h"
#include "output_internal.h"
#include "audio.h"
#include "client.h"
void
printAudioDevices(struct client *client)
{
unsigned n = audio_output_count();
for (unsigned i = 0; i < n; ++i) {
const struct audio_output *ao = audio_output_get(i);
client_printf(client,
"outputid: %i\n"
"outputname: %s\n"
"outputenabled: %i\n",
i, ao->name, ao->enabled);
}
}
/*
* Copyright (C) 2003-2009 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* Protocol specific code for the audio output library.
*
*/
#ifndef OUTPUT_PRINT_H
#define OUTPUT_PRINT_H
struct client;
void
printAudioDevices(struct client *client);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment