mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
SNES: fix sample end
This commit is contained in:
parent
d78b1cb79a
commit
ffa0181704
2 changed files with 2 additions and 2 deletions
|
@ -60,7 +60,7 @@ long brrEncode(short* buf, unsigned char* out, long len, long loopStart) {
|
||||||
if (s<0) s=-s;
|
if (s<0) s=-s;
|
||||||
while (range<12 && s>((8<<range)-1)) range++;
|
while (range<12 && s>((8<<range)-1)) range++;
|
||||||
}
|
}
|
||||||
next[0]=(range<<4)|(filter<<2)|((i+16>len)?1:0);
|
next[0]=(range<<4)|(filter<<2)|((i+16>=len)?1:0);
|
||||||
switch (filter) {
|
switch (filter) {
|
||||||
case 0:
|
case 0:
|
||||||
for (int j=0; j<16; j++) {
|
for (int j=0; j<16; j++) {
|
||||||
|
|
|
@ -912,7 +912,7 @@ void DivSample::render() {
|
||||||
if (depth!=DIV_SAMPLE_DEPTH_BRR) { // BRR
|
if (depth!=DIV_SAMPLE_DEPTH_BRR) { // BRR
|
||||||
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return;
|
if (!initInternal(DIV_SAMPLE_DEPTH_BRR,samples)) return;
|
||||||
// TODO: loop point
|
// TODO: loop point
|
||||||
brrEncode(data16,dataBRR,samples,0);
|
brrEncode(data16,dataBRR,(samples+15)&(~15),0);
|
||||||
}
|
}
|
||||||
if (depth!=DIV_SAMPLE_DEPTH_VOX) { // VOX
|
if (depth!=DIV_SAMPLE_DEPTH_VOX) { // VOX
|
||||||
if (!initInternal(DIV_SAMPLE_DEPTH_VOX,samples)) return;
|
if (!initInternal(DIV_SAMPLE_DEPTH_VOX,samples)) return;
|
||||||
|
|
Loading…
Reference in a new issue