diff options
Diffstat (limited to 'libs/surfaces/mackie/fader.cc')
-rw-r--r-- | libs/surfaces/mackie/fader.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/surfaces/mackie/fader.cc b/libs/surfaces/mackie/fader.cc index a55c23c129..4a6c81f491 100644 --- a/libs/surfaces/mackie/fader.cc +++ b/libs/surfaces/mackie/fader.cc @@ -17,6 +17,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <cmath> + #include "fader.h" #include "surface.h" #include "control_group.h" @@ -50,6 +52,6 @@ Fader::update_message () return MidiByteArray(); } - int posi = int (0x3fff * position); - return MidiByteArray (3, 0xe0 | id(), posi & 0x7f, posi >> 7); + int posi = lrintf (0x3fff * position); + return MidiByteArray (3, 0xe0 + id(), posi & 0x7f, posi >> 7); } |