summaryrefslogtreecommitdiff
path: root/dgedit/player.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-05-02 15:16:00 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-05-02 15:16:00 +0200
commit52f81e6e8ef4d80b006a3063afabb4fc4b60e594 (patch)
tree338ad22c0c022bddd9341a7ffeb2bb044e3ae699 /dgedit/player.cc
parent2b055b728ac0c58eb571413e7aba31dd3b90f685 (diff)
parent7ec14ac0fa7e95dda01d396edbd190a8aeb78b2b (diff)
Merge branch 'master' of http://git.drumgizmo.org/drumgizmo
Diffstat (limited to 'dgedit/player.cc')
-rw-r--r--dgedit/player.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/dgedit/player.cc b/dgedit/player.cc
index 64b3067..3a2bfd2 100644
--- a/dgedit/player.cc
+++ b/dgedit/player.cc
@@ -102,7 +102,9 @@ void Player::run()
sample = pcm_data[p] * fade * gain_scalar;
}
- if(abs(sample) > peak) peak = abs(sample);
+ if(fabs(sample) > peak) {
+ peak = fabs(sample);
+ }
s[i] = _MIN(sample * SHRT_MAX, SHRT_MAX);
}