Mercurial > hg > wabletios
comparison scanpath.mm @ 14:4ba81a12b008
Fixed OSC crash.
Fixed really nasty clipping with less nasty clipping.
V1.2
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Mon, 14 Jul 2014 16:26:30 +0100 |
parents | 426d645d8e69 |
children |
comparison
equal
deleted
inserted
replaced
13:426d645d8e69 | 14:4ba81a12b008 |
---|---|
293 } | 293 } |
294 | 294 |
295 double sample = (1 - frameInterpolator)*oldsample + frameInterpolator*newsample; | 295 double sample = (1 - frameInterpolator)*oldsample + frameInterpolator*newsample; |
296 //cout << sample << endl; | 296 //cout << sample << endl; |
297 // keep within the bounds of acceptability | 297 // keep within the bounds of acceptability |
298 sample = sample*3.0; | 298 |
299 | |
300 if(sample > 0.99){ | |
301 cout << "BIG" << endl; | |
302 | |
303 sample = 0.99; | |
304 }else if(sample < -0.0){ | |
305 cout << "SMALL" << endl; | |
306 sample = 0.0; | |
307 } | |
308 return sample; | 299 return sample; |
309 | 300 |
310 } | 301 } |
311 //---------------------------------------------------------------- | 302 //---------------------------------------------------------------- |
312 // get next sample: just one sample at a time at sample rate | 303 // get next sample: just one sample at a time at sample rate |