From 887f305d37cef754d3a50104b9e312ce01e2815c Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 11 Oct 2005 10:09:47 +0000 Subject: fixes for Metrowerks fix compilation for CFM small fixes correction of limits on buffer resize svn path=/trunk/; revision=3692 --- externals/grill/xsample/source/main.cpp | 7 ++++++- externals/grill/xsample/source/main.h | 2 ++ externals/grill/xsample/xsample.mcp | Bin 457399 -> 457399 bytes 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'externals') 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) { diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h index e7ac6280..c3a1a66e 100644 --- a/externals/grill/xsample/source/main.h +++ b/externals/grill/xsample/source/main.h @@ -69,7 +69,9 @@ extern "C++" { #endif // this is for the UInt32 prototype (thanks to Jamie) // \TODO we'd rather not use Carbon but some other framework + #ifdef __MACH__ #include + #endif // Initialize a prefetch constant for use with vec_dst(), vec_dstt(), vec_dstst or vec_dststt // Taken from the "AltiVec tutorial" by Ian Ollmann, Ph.D. diff --git a/externals/grill/xsample/xsample.mcp b/externals/grill/xsample/xsample.mcp index 2903bb7d..ae5530a9 100755 Binary files a/externals/grill/xsample/xsample.mcp and b/externals/grill/xsample/xsample.mcp differ -- cgit v1.2.1