summaryrefslogtreecommitdiff
path: root/src/ui_act.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui_act.c')
-rw-r--r--src/ui_act.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ui_act.c b/src/ui_act.c
index 679f098..0ed55ec 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -103,6 +103,8 @@ BarUiActCallback(BarUiActHelp) {
"select quickmix stations",
NULL,
"bookmark song/artist",
+ "decrease volume",
+ "increase volume",
};
size_t i;
@@ -564,3 +566,19 @@ BarUiActCallback(BarUiActBookmark) {
}
}
+/* decrease volume
+ */
+BarUiActCallback(BarUiActVolDown) {
+ --app->settings.volume;
+ /* FIXME: assuming unsigned integer store is atomic operation */
+ app->player.scale = BarPlayerCalcScale (app->player.gain + app->settings.volume);
+}
+
+/* increase volume
+ */
+BarUiActCallback(BarUiActVolUp) {
+ ++app->settings.volume;
+ /* FIXME: assuming unsigned integer store is atomic operation */
+ app->player.scale = BarPlayerCalcScale (app->player.gain + app->settings.volume);
+}
+