Skip to content

Commit

Permalink
Sas: Correct calculation of VAG end.
Browse files Browse the repository at this point in the history
Not sure why everything is negative one indexed, but this has to be right.
Otherwise, we end up decoding 16 bytes outside of the size of the buffer.

This may reduce slight garbage noise after sound effects.
  • Loading branch information
unknownbrackets committed May 29, 2018
1 parent 10acfc6 commit b9dc7fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/HW/SasAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void VagDecoder::DecodeBlock(u8 *&read_pointer) {
s_2 = s2;
curSample = 0;
curBlock_++;
if (curBlock_ == numBlocks_) {
if (curBlock_ == numBlocks_ - 1) {
end_ = true;
}

Expand Down

0 comments on commit b9dc7fc

Please sign in to comment.