xaizek / pms (License: GPLv3+) (since 2018-12-07)
Older version of Practical Music Search written in C++.
Commit df45b558a8ec33b496ab43510627c19c0deda166

Fix Control::mute(), which was completely broken
Author: Kim Tore Jensen
Author date (UTC): 2015-08-22 16:38
Committer name: Kim Tore Jensen
Committer date (UTC): 2015-08-22 16:38
Parent(s): e28e3a24c42b450340d6c94b23bf2ec5d903eea3
Signing key:
Tree: 465c9030bbe39671cb5b3caebba15e8cccbf3245
File Lines added Lines deleted
src/command.cpp 10 9
File src/command.cpp changed (mode: 100644) (index 73c39dd..78b6dbf)
... ... Control::setvolume(int vol)
689 689
690 690 pms->log(MSG_DEBUG, 0, "Setting volume to %d%%\n", vol); pms->log(MSG_DEBUG, 0, "Setting volume to %d%%\n", vol);
691 691
692 if (mpd_run_set_volume(conn->h(), vol)) {
693 mutevolume = 0;
694 }
695
696 return get_error_bool();
692 return mpd_run_set_volume(conn->h(), vol);
697 693 } }
698 694
699 695 /* /*
 
... ... bool
712 708 Control::mute() Control::mute()
713 709 { {
714 710 if (muted()) { if (muted()) {
715 return setvolume(mutevolume);
711 if (setvolume(mutevolume)) {
712 mutevolume = 0;
713 }
714 } else {
715 if (setvolume(0)) {
716 mutevolume = st->volume;
717 }
716 718 } }
717 719
718 mutevolume = st->volume;
719 return setvolume(0);
720 return get_error_bool();
720 721 } }
721 722
722 723 /* /*
 
... ... Control::mute()
725 726 bool bool
726 727 Control::muted() Control::muted()
727 728 { {
728 return (st->volume == -1 || mutevolume != 0);
729 return (st->volume <= 0);
729 730 } }
730 731
731 732 /* /*
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/pms

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/pms

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master