2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 00:27:42 +00:00

Signed read bug fix

This commit is contained in:
Jack Andersen
2016-08-28 16:28:55 -10:00
parent 7953ca4828
commit e2f342d107
3 changed files with 26 additions and 24 deletions

View File

@@ -471,6 +471,7 @@ BitstreamWriter::write(const std::vector<std::vector<Value>>& chanKeys,
/* Generate Bitstream */
sizeOut = ComputeBitstreamSize(keyFrameCount, channels);
std::unique_ptr<atUint8[]> newData(new atUint8[sizeOut]);
memset(newData.get(), 0, sizeOut);
lastVals = initVals;
for (size_t f=0 ; f<keyFrameCount ; ++f)
@@ -479,7 +480,7 @@ BitstreamWriter::write(const std::vector<std::vector<Value>>& chanKeys,
vit = lastVals.begin();
for (const Channel& chan : channels)
{
const Value& val = (*kit++)[f];
const Value& val = (*kit++)[f+1];
QuantizedValue& last = *vit++;
switch (chan.type)
{