parent
779a8d8810
commit
91965bca8c
|
@ -256,7 +256,7 @@ long brrEncode(short* buf, unsigned char* out, long len, long loopStart, unsigne
|
|||
total+=9;
|
||||
}
|
||||
// encode loop block
|
||||
if (loopStart>=0) {
|
||||
if (loopStart>=0 && loopStart<len) {
|
||||
long p=loopStart;
|
||||
for (int i=0; i<17; i++) {
|
||||
if (p>=len) {
|
||||
|
|
|
@ -1479,7 +1479,8 @@ void DivSample::render(unsigned int formatMask) {
|
|||
}
|
||||
}
|
||||
if (NOT_IN_FORMAT(DIV_SAMPLE_DEPTH_BRR)) { // BRR
|
||||
int sampleCount=loop?loopEnd:samples;
|
||||
int sampleCount=isLoopable()?loopEnd:samples;
|
||||
if (sampleCount>(int)samples) sampleCount=samples;
|
||||
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,sampleCount)) return;
|
||||
brrEncode(data16,dataBRR,sampleCount,loop?loopStart:-1,brrEmphasis,brrNoFilter);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue