diff options
author | Max Kellermann <max@duempel.org> | 2009-03-12 18:34:37 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-12 18:34:37 +0100 |
commit | e9cbb6be3f7c0a13425fdb542db619452668a6b5 (patch) | |
tree | 4a420ff03583d0cccc37d1e250685e6ea26f3b9f /src/audio.c | |
parent | 9feaedd799cf68173700f3d390c559ee840a430a (diff) | |
download | mpd-e9cbb6be3f7c0a13425fdb542db619452668a6b5.tar.gz mpd-e9cbb6be3f7c0a13425fdb542db619452668a6b5.tar.xz mpd-e9cbb6be3f7c0a13425fdb542db619452668a6b5.zip |
audio: moved mixer functions to mixer_control.c
Diffstat (limited to '')
-rw-r--r-- | src/audio.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/audio.c b/src/audio.c index 8c5132199..dce9bc93f 100644 --- a/src/audio.c +++ b/src/audio.c @@ -60,55 +60,3 @@ void finishAudioConfig(void) { audio_format_clear(&configured_audio_format); } - -bool mixer_control_setvol(unsigned int device, int volume, int rel) -{ - struct audio_output *output; - struct mixer *mixer; - - if (device >= audio_output_count()) - return false; - - output = audio_output_get(device); - 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; - - if (device >= audio_output_count()) - return false; - - output = audio_output_get(device); - 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; -} |