/*
- Copyright (C) 2007 Paul Davis
- Author: Dave Robillard
+ Copyright (C) 2007 Paul Davis
+ Author: David Robillard
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifndef __gtk_ardour_midi_util_h__
#define __gtk_ardour_midi_util_h__
-inline static void clamp_0_to_127(uint8_t &val)
+inline static void clamp_to_0_127(uint8_t &val)
{
- if( (127 < val) && (val < 192) ) {
+ if ((127 < val) && (val < 192)) {
val = 127;
- } else if( (192 <= val) && (val < 255) ) {
+ } else if ((192 <= val) && (val < 255)) {
val = 0;
- }
+ }
}
#endif /* __gtk_ardour_midi_util_h__ */