mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Break apart the SetData function
This commit is contained in:
1 parent
8f66ebde90
commit
36fdb09056
2 files changed
+6
-5
No files matched your search
@@ -546,9 +546,12 @@ int Atrac2::SetData(const Track &track, u32 bufferAddr, u32 readSize, u32 buffer
|
||||
}
|
||||
}
|
||||
|
||||
// Copied from the old implementation, let's see where they are useful.
|
||||
int firstExtra = track_.FirstOffsetExtra();
|
||||
InitContext(0, bufferAddr, readSize, bufferSize);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Atrac2::InitContext(int offset, u32 bufferAddr, u32 readSize, u32 bufferSize) {
|
||||
SceAtracIdInfo &info = context_->info;
|
||||
// Copy parameters into struct.
|
||||
info.buffer = bufferAddr;
|
||||
info.bufferByte = bufferSize;
|
||||
@@ -606,8 +609,6 @@ int Atrac2::SetData(const Track &track, u32 bufferAddr, u32 readSize, u32 buffer
|
||||
Memory::Memset(info.buffer, 0, 128);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 Atrac2::GetInternalCodecError() const {
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
u32 GetInternalCodecError() const override;
|
||||
|
||||
private:
|
||||
void SkipFramesAfterReset();
|
||||
void InitContext(int offset, u32 bufferAddr, u32 readSize, u32 bufferSize);
|
||||
|
||||
void SeekToSample(int sample);
|
||||
|
||||
|
||||
Reference in new issue
Block a user