Don't use unsigned

This commit is contained in:
falkTX 2016-07-17 16:04:19 +02:00
parent 25ecafb56f
commit 242815968d
2 changed files with 4 additions and 4 deletions

6
drmr.c
View File

@ -377,7 +377,7 @@ static void run(LV2_Handle instance, uint32_t n_samples) {
pthread_mutex_lock(&drmr->load_mutex); pthread_mutex_lock(&drmr->load_mutex);
for (i = 0;i < drmr->num_samples;i++) { for (i = 0;i < drmr->num_samples;i++) {
uint32_t pos,lim; int pos,lim;
drmr_sample* cs = drmr->samples+i; drmr_sample* cs = drmr->samples+i;
if ((cs->active || cs->dataoffset) && (cs->limit > 0)) { if ((cs->active || cs->dataoffset) && (cs->limit > 0)) {
float coef_right, coef_left; float coef_right, coef_left;
@ -392,10 +392,10 @@ static void run(LV2_Handle instance, uint32_t n_samples) {
coef_right = coef_left = 1.0f; coef_right = coef_left = 1.0f;
} }
uint32_t datastart, dataend; int datastart, dataend;
if (cs->active) { if (cs->active) {
datastart = cs->dataoffset; datastart = cs->dataoffset;
dataend = (uint32_t)-1; dataend = n_samples;
} else { } else {
datastart = 0; datastart = 0;
dataend = cs->dataoffset; dataend = cs->dataoffset;

2
drmr.h
View File

@ -61,7 +61,7 @@ typedef struct {
float velocity; float velocity;
drmr_layer *layers; drmr_layer *layers;
float* data; float* data;
uint32_t dataoffset; int dataoffset;
} drmr_sample; } drmr_sample;
// lv2 stuff // lv2 stuff