aboutsummaryrefslogtreecommitdiffstats
path: root/src/volume.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-14 11:10:21 +0100
committerMax Kellermann <max@duempel.org>2009-03-14 11:10:21 +0100
commitf15d879e37985224aa4780a9de6b81d2df781ed6 (patch)
treeee5d242add0bd917077df92f5e6ee0d5cfc08cad /src/volume.c
parentf31c371fbd95d1999b18c6b35596d8f3b71b620c (diff)
downloadmpd-f15d879e37985224aa4780a9de6b81d2df781ed6.tar.gz
mpd-f15d879e37985224aa4780a9de6b81d2df781ed6.tar.xz
mpd-f15d879e37985224aa4780a9de6b81d2df781ed6.zip
volume: use bool instead of int
Return true/false on success/failure, instead of 0/-1. Pass true/false instead of 1/0 for the "rel" boolean parameter.
Diffstat (limited to 'src/volume.c')
-rw-r--r--src/volume.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/volume.c b/src/volume.c
index 5ce842251..8e97280a4 100644
--- a/src/volume.c
+++ b/src/volume.c
@@ -215,7 +215,7 @@ int volume_level_get(void)
return -1;
}
-static int software_volume_change(int change, int rel)
+static bool software_volume_change(int change, bool rel)
{
int new = change;
@@ -240,10 +240,10 @@ static int software_volume_change(int change, int rel)
setPlayerSoftwareVolume(new);
- return 0;
+ return true;
}
-static int hardware_volume_change(int change, int rel)
+static bool hardware_volume_change(int change, bool rel)
{
int device, count;
@@ -254,10 +254,10 @@ static int hardware_volume_change(int change, int rel)
for (device=0; device<count ;device++) {
mixer_control_setvol(device, change, rel);
}
- return 0;
+ return true;
}
-int volume_level_change(int change, int rel)
+bool volume_level_change(int change, bool rel)
{
idle_add(IDLE_MIXER);
@@ -267,7 +267,7 @@ int volume_level_change(int change, int rel)
case VOLUME_MIXER_TYPE_SOFTWARE:
return software_volume_change(change, rel);
default:
- return 0;
+ return true;
}
}