aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-14 11:35:54 +0100
committerMax Kellermann <max@duempel.org>2009-03-14 11:35:54 +0100
commit8d01110c8407b1efbdbe255f2e27a6daf6ac2d9a (patch)
treea82153c89401945136eac4229e759df57e493ef4 /src/mixer_control.c
parent88af35c0aba64783e111dfb0585d7958a9e9963e (diff)
downloadmpd-8d01110c8407b1efbdbe255f2e27a6daf6ac2d9a.tar.gz
mpd-8d01110c8407b1efbdbe255f2e27a6daf6ac2d9a.tar.xz
mpd-8d01110c8407b1efbdbe255f2e27a6daf6ac2d9a.zip
mixer_control: moved functions to mixer_all.c
Diffstat (limited to 'src/mixer_control.c')
-rw-r--r--src/mixer_control.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/mixer_control.c b/src/mixer_control.c
index 66b68bde4..229c3683e 100644
--- a/src/mixer_control.c
+++ b/src/mixer_control.c
@@ -19,66 +19,5 @@
#include "mixer_control.h"
#include "mixer_api.h"
-#include "output_all.h"
-#include "output_plugin.h"
-#include "output_internal.h"
#include <assert.h>
-
-bool
-mixer_control_setvol(unsigned int device, int volume, int rel)
-{
- struct audio_output *output;
- struct mixer *mixer;
-
- assert(device < audio_output_count());
-
- output = audio_output_get(device);
- if (!output->enabled)
- return false;
-
- mixer = ao_plugin_get_mixer(output->plugin, output->data);
- if (mixer != NULL) {
- if (rel) {
- int cur_volume = mixer_get_volume(mixer);
- if (cur_volume < 0)
- return false;
-
- volume = volume + cur_volume;
- }
- if (volume > 100)
- volume = 100;
- else if (volume < 0)
- volume = 0;
-
- return mixer_set_volume(mixer, volume);
- }
- return false;
-}
-
-bool
-mixer_control_getvol(unsigned int device, int *volume)
-{
- struct audio_output *output;
- struct mixer *mixer;
-
- assert(device < audio_output_count());
-
- output = audio_output_get(device);
- if (!output->enabled)
- return false;
-
- mixer = ao_plugin_get_mixer(output->plugin, output->data);
- if (mixer != NULL) {
- int volume2;
-
- volume2 = mixer_get_volume(mixer);
- if (volume2 < 0)
- return false;
-
- *volume = volume2;
- return true;
- }
-
- return false;
-}