mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Break apart the SetData function
This commit is contained in:
parent
8f66ebde90
commit
36fdb09056
2 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue