add molly-guard
This commit is contained in:
parent
11d1cfd7de
commit
f05bc14461
@ -65,6 +65,12 @@ while (2==fscanf(input, "%d %d", &left, &right)) {
|
||||
buffer[idx++] = left;
|
||||
buffer[idx++] = right;
|
||||
|
||||
/* SANITY CONTROL */
|
||||
if ( (abs(left) > 32767) || (abs(right) > 32767) ) {
|
||||
fprintf(stderr, "OVERFLOW sample %9d values %7d %7d\n",
|
||||
idx, left, right);
|
||||
}
|
||||
|
||||
if (idx >= SMPL_COUNT) {
|
||||
/* flush buffer to file */
|
||||
sf_write_short(sndf, buffer, idx);
|
||||
|
Loading…
Reference in New Issue
Block a user