position-event-sounds: don't warn that loud about vpos/hpos out of range
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Sep 2009 00:04:59 +0000 (02:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 17 Sep 2009 00:04:59 +0000 (02:04 +0200)
src/modules/module-position-event-sounds.c

index fa8f73d..7221b14 100644 (file)
@@ -65,8 +65,9 @@ static int parse_pos(const char *pos, double *f) {
     }
 
     if (*f < 0.0 || *f > 1.0) {
-        pa_log_warn("Property hpos/vpos out of range %0.2f", *f);
-        return -1;
+        pa_log_debug("Property hpos/vpos out of range %0.2f", *f);
+
+        *f = PA_CLAMP(*f, 0.0, 1.0);
     }
 
     return 0;