mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 14:00:03 +00:00
Atrac: Make sure NO_DATA is always set.
This way we can move away from data_buf, which eventually we'll stop using entirely, in preference for PSP RAM.
This commit is contained in:
parent
3f3700cb45
commit
a932b0858c
@ -169,6 +169,7 @@ struct Atrac {
|
||||
if (data_buf)
|
||||
delete [] data_buf;
|
||||
data_buf = 0;
|
||||
bufferState = ATRAC_STATUS_NO_DATA;
|
||||
|
||||
if (atracContext.IsValid())
|
||||
kernelMemory.Free(atracContext.ptr);
|
||||
@ -1695,6 +1696,9 @@ static int _AtracSetData(Atrac *atrac, u32 buffer, u32 bufferSize) {
|
||||
u32 copybytes = std::min(bufferSize, atrac->first.filesize);
|
||||
Memory::Memcpy(atrac->data_buf, buffer, copybytes);
|
||||
return __AtracSetContext(atrac);
|
||||
} else {
|
||||
// Should not get here, but just in case, force it.
|
||||
atrac->bufferState = ATRAC_STATUS_NO_DATA;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user