diff options
author | Simon Gomizelj <simongmzlj@gmail.com> | 2012-08-11 03:35:50 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-08-11 11:54:58 -0400 |
commit | edc85fcc3706c5fce2b1a70c09b828c66eb48fb6 (patch) | |
tree | 4c4633becfc26432c74a61582724282f3bec3024 | |
parent | 06434214fc41c85245d202a622a38553a48f3c29 (diff) | |
download | mirror-ponymix-edc85fcc3706c5fce2b1a70c09b828c66eb48fb6.tar.gz mirror-ponymix-edc85fcc3706c5fce2b1a70c09b828c66eb48fb6.tar.bz2 mirror-ponymix-edc85fcc3706c5fce2b1a70c09b828c66eb48fb6.zip |
remove getters, unmute and mute
-rw-r--r-- | pulsemix.c | 28 |
1 files changed, 4 insertions, 24 deletions
@@ -242,11 +242,6 @@ static void pulse_async_wait(struct pulseaudio_t *pulse, pa_operation *op) pa_mainloop_iterate(pulse->mainloop, 1, NULL); } -static void get_volume(struct pulseaudio_t *pulse) -{ - printf("%d\n", pulse->head->volume_percent); -} - static int set_volume(struct pulseaudio_t *pulse, struct io_t *dev, long v) { pa_cvolume *vol = pa_cvolume_set(&dev->volume, dev->volume.channels, @@ -267,11 +262,6 @@ static int set_volume(struct pulseaudio_t *pulse, struct io_t *dev, long v) return !pulse->success; } -static void get_balance(struct pulseaudio_t *pulse) -{ - printf("%d\n", pulse->head->balance); -} - static int set_balance(struct pulseaudio_t *pulse, struct io_t *dev, long v) { pa_cvolume *vol; @@ -312,16 +302,6 @@ static int set_mute(struct pulseaudio_t *pulse, struct io_t *dev, int mute) return !pulse->success; } -static int unmute(struct pulseaudio_t *pulse, struct io_t *dev) -{ - return set_mute(pulse, dev, 0); -} - -static int mute(struct pulseaudio_t *pulse, struct io_t *dev) -{ - return set_mute(pulse, dev, 1); -} - static void print(struct io_t *dev) { printf("%s %2d: %s\n %s\n Avg. Volume: %d%% %s\n", dev->pp_name, @@ -609,13 +589,13 @@ int main(int argc, char *argv[]) switch (verb) { case ACTION_GETVOL: - get_volume(&pulse); + printf("%d\n", pulse.head->volume_percent); break; case ACTION_SETVOL: rc = set_volume(&pulse, pulse.head, value); break; case ACTION_GETBAL: - get_balance(&pulse); + printf("%d\n", pulse.head->balance); break; case ACTION_SETBAL: rc = set_balance(&pulse, pulse.head, @@ -630,10 +610,10 @@ int main(int argc, char *argv[]) CLAMP(pulse.head->volume_percent - value, 0, 150)); break; case ACTION_MUTE: - rc = mute(&pulse, pulse.head); + rc = set_mute(&pulse, pulse.head, 1); break; case ACTION_UNMUTE: - rc = unmute(&pulse, pulse.head); + rc = set_mute(&pulse, pulse.head, 0); break; case ACTION_TOGGLE: rc = set_mute(&pulse, pulse.head, !pulse.head->mute); |