ref: fc6a9530e55dcd4509a5a231bc183f3c5af39d63
parent: 4be080eba3673dce91fc16091930a6b70ef1d362
author: Ulrich Klauer <ulrich@chirlu.de>
date: Thu Apr 5 21:00:03 EDT 2012
Undo "Fix VS2008 build issues" This reverts commit 4be080eba3673dce91fc16091930a6b70ef1d362. My next commits will address those MSVC issues in a different way.
--- a/src/effects.c
+++ b/src/effects.c
@@ -241,7 +241,7 @@
sox_effect_t *effp1 = chain->effects[n - 1];
sox_effect_t *effp = chain->effects[n];
int effstatus = SOX_SUCCESS;
- int f = 0;
+ size_t f = 0;
size_t idone = effp1->oend - effp1->obeg;
size_t obeg = sox_globals.bufsiz - effp->oend;
sox_bool il_change = (effp->flows == 1) !=
@@ -272,7 +272,7 @@
if (sox_globals.use_threads && effp->flows > 1)
{
#pragma omp parallel for
- for (f = 0; f < (int)effp->flows; ++f) {
+ for (f = 0; f < effp->flows; ++f) {
size_t idonec = idone / effp->flows;
size_t odonec = obeg / effp->flows;
int eff_status_c = effp->handler.flow(&chain->effects[n][f],
@@ -291,7 +291,7 @@
else /* sox_globals.use_threads */
#endif
{
- for (f = 0; f < (int)effp->flows; ++f) {
+ for (f = 0; f < effp->flows; ++f) {
size_t idonec = idone / effp->flows;
size_t odonec = obeg / effp->flows;
int eff_status_c = effp->handler.flow(&chain->effects[n][f],
@@ -322,7 +322,7 @@
effp1->obeg = effp1->oend = 0;
else if (effp1->oend - effp1->obeg < effp->imin) { /* Need to refill? */
size_t flow_offs = sox_globals.bufsiz/effp->flows;
- for (f = 0; f < (int)effp->flows; ++f)
+ for (f = 0; f < effp->flows; ++f)
memcpy(effp1->obuf + f * flow_offs,
effp1->obuf + f * flow_offs + effp1->obeg/effp->flows,
(effp1->oend - effp1->obeg)/effp->flows * sizeof(*effp1->obuf));
--- a/src/pad.c
+++ b/src/pad.c
@@ -42,7 +42,7 @@
next = lsx_parsesamples(rate, p->pads[i].str, &p->pads[i].pad, 't');
if (next == NULL) break;
if (*next == '\0')
- p->pads[i].start = i? ~(sox_uint64_t)0 : 0;
+ p->pads[i].start = i? UINT64_MAX : 0;
else {
if (*next != '@') break;
next = lsx_parsesamples(rate, next+1, &p->pads[i].start, 't');
@@ -88,7 +88,7 @@
/* Check that the last pad position (except for "at the end")
is within bounds. */
i = p->npads;
- if (i > 0 && p->pads[i-1].start == ~(sox_uint64_t)0)
+ if (i > 0 && p->pads[i-1].start == UINT64_MAX)
i--;
if (i > 0 &&
p->pads[i-1].start * effp->in_signal.channels
@@ -140,7 +140,7 @@
priv_t * p = (priv_t *)effp->priv;
static size_t isamp = 0;
if (p->pads_pos != p->npads && p->in_pos != p->pads[p->pads_pos].start)
- p->in_pos = ~(sox_uint64_t)0; /* Invoke the final pad (with no given start) */
+ p->in_pos = UINT64_MAX; /* Invoke the final pad (with no given start) */
return flow(effp, 0, obuf, &isamp, osamp);
}