Prepare for backward and bi-directional loop
This commit is contained in:
parent
da8f7dabd5
commit
d44f5f0b2b
27 changed files with 418 additions and 123 deletions
|
|
@ -49,13 +49,13 @@ void DivPlatformPCMDAC::acquire(short* bufL, short* bufR, size_t start, size_t l
|
|||
output=(chan.ws.output[chan.audPos]^0x80)<<8;
|
||||
} else {
|
||||
DivSample* s=parent->getSample(chan.sample);
|
||||
if (s->samples>0) {
|
||||
if (s->isLoopable() && chan.audPos>=s->getEndPosition()) {
|
||||
chan.audPos=s->loopStart;
|
||||
} else if (chan.audPos>=s->samples) {
|
||||
if (s->getEndPosition()>0) {
|
||||
if (s->isLoopable() && chan.audPos>=(unsigned int)s->getLoopEndPosition()) {
|
||||
chan.audPos=s->getLoopStartPosition();
|
||||
} else if (chan.audPos>=(unsigned int)s->getEndPosition()) {
|
||||
chan.sample=-1;
|
||||
}
|
||||
if (chan.audPos<s->samples) {
|
||||
if (chan.audPos<(unsigned int)s->getEndPosition()) {
|
||||
output=s->data16[chan.audPos];
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue