mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Make the vag block buffer s16.
The values are clamped already, anyway.
This commit is contained in:
parent
f7fa0a06d4
commit
ec2d88cf17
2 changed files with 11 additions and 3 deletions
|
@ -152,11 +152,19 @@ void VagDecoder::GetSamples(s16 *outSamples, int numSamples) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VagDecoder::DoState(PointerWrap &p) {
|
void VagDecoder::DoState(PointerWrap &p) {
|
||||||
auto s = p.Section("VagDecoder", 1);
|
auto s = p.Section("VagDecoder", 1, 2);
|
||||||
if (!s)
|
if (!s)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
p.DoArray(samples, ARRAY_SIZE(samples));
|
if (s >= 2) {
|
||||||
|
p.DoArray(samples, ARRAY_SIZE(samples));
|
||||||
|
} else {
|
||||||
|
int samplesOld[ARRAY_SIZE(samples)];
|
||||||
|
p.DoArray(samplesOld, ARRAY_SIZE(samples));
|
||||||
|
for (size_t i = 0; i < ARRAY_SIZE(samples); ++i) {
|
||||||
|
samples[i] = samplesOld[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
p.Do(curSample);
|
p.Do(curSample);
|
||||||
|
|
||||||
p.Do(data_);
|
p.Do(data_);
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
void DoState(PointerWrap &p);
|
void DoState(PointerWrap &p);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int samples[28];
|
s16 samples[28];
|
||||||
int curSample;
|
int curSample;
|
||||||
|
|
||||||
u32 data_;
|
u32 data_;
|
||||||
|
|
Loading…
Add table
Reference in a new issue