Changeset 886a7d8


Ignore:
Timestamp:
Nov 28, 2016, 2:57:07 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
sampler
Children:
d02d8f0
Parents:
816932e
Message:

src/synth/sampler.c: also seek in table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/synth/sampler.c

    r816932e r886a7d8  
    685685  if (o->source) {
    686686    ret = aubio_source_seek(o->source, pos);
    687   } else {
    688     o->table_index = pos;
    689   }
     687  } else if (o->table && (sint_t)pos >= 0 && pos < o->table->length) {
     688    o->table_index = pos < o->table->length ? pos : o->table->length - 1;
     689    ret = AUBIO_OK;
     690  }
     691  o->last_read = 0;
    690692  return ret;
    691693}
Note: See TracChangeset for help on using the changeset viewer.