aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/xsample/source/main.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-10-11 10:09:47 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-10-11 10:09:47 +0000
commit887f305d37cef754d3a50104b9e312ce01e2815c (patch)
treebaac81bbcb00448cb6ff052c70ad1982fcc5db87 /externals/grill/xsample/source/main.cpp
parentbef75645dd01c9d9e1d375e0e3426eac809875f7 (diff)
fixes for Metrowerks
fix compilation for CFM small fixes correction of limits on buffer resize svn path=/trunk/; revision=3692
Diffstat (limited to 'externals/grill/xsample/source/main.cpp')
-rw-r--r--externals/grill/xsample/source/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index a948c056..df0c1456 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -167,8 +167,13 @@ void xsample::DoUpdate(unsigned int flags)
buf.Set();
if(flags&xsc_range && buf.Ok()) {
+ const int f = buf.Frames();
+
if(curmin < 0) curmin = 0;
- if(curmax > buf.Frames()) curmax = buf.Frames();
+ else if(curmin > f) curmin = f;
+
+ if(curmax > f) curmax = f;
+ else if(curmax < curmin) curmax = curmin;
}
if(flags&xsc_units) {