Skip to content

Commit 2428159

Browse files
author
falkTX
committed
Don't use unsigned
1 parent 25ecafb commit 2428159

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drmr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ static void run(LV2_Handle instance, uint32_t n_samples) {
377377

378378
pthread_mutex_lock(&drmr->load_mutex);
379379
for (i = 0;i < drmr->num_samples;i++) {
380-
uint32_t pos,lim;
380+
int pos,lim;
381381
drmr_sample* cs = drmr->samples+i;
382382
if ((cs->active || cs->dataoffset) && (cs->limit > 0)) {
383383
float coef_right, coef_left;
@@ -392,10 +392,10 @@ static void run(LV2_Handle instance, uint32_t n_samples) {
392392
coef_right = coef_left = 1.0f;
393393
}
394394

395-
uint32_t datastart, dataend;
395+
int datastart, dataend;
396396
if (cs->active) {
397397
datastart = cs->dataoffset;
398-
dataend = (uint32_t)-1;
398+
dataend = n_samples;
399399
} else {
400400
datastart = 0;
401401
dataend = cs->dataoffset;

drmr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef struct {
6161
float velocity;
6262
drmr_layer *layers;
6363
float* data;
64-
uint32_t dataoffset;
64+
int dataoffset;
6565
} drmr_sample;
6666

6767
// lv2 stuff

0 commit comments

Comments
 (0)