mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #18392 from sum2012/AtracInfo
Record Atrac library version
This commit is contained in:
commit
ede0f093e1
3 changed files with 31 additions and 6 deletions
|
@ -657,6 +657,8 @@ const int PSP_NUM_ATRAC_IDS = 6;
|
|||
static bool atracInited = true;
|
||||
static Atrac *atracIDs[PSP_NUM_ATRAC_IDS];
|
||||
static u32 atracIDTypes[PSP_NUM_ATRAC_IDS];
|
||||
static int atracLibVersion = 0;
|
||||
static u32 atracLibCrc = 0;
|
||||
|
||||
void __AtracInit() {
|
||||
atracInited = true;
|
||||
|
@ -680,8 +682,14 @@ void __AtracInit() {
|
|||
#endif // USE_FFMPEG
|
||||
}
|
||||
|
||||
void __AtracLoadModule(int version, u32 crc) {
|
||||
atracLibVersion = version;
|
||||
atracLibCrc = crc;
|
||||
INFO_LOG(ME, "AtracInit, atracLibVersion 0x%0x, atracLibcrc %x", atracLibVersion, atracLibCrc);
|
||||
}
|
||||
|
||||
void __AtracDoState(PointerWrap &p) {
|
||||
auto s = p.Section("sceAtrac", 1);
|
||||
auto s = p.Section("sceAtrac", 1, 2);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
|
@ -697,6 +705,14 @@ void __AtracDoState(PointerWrap &p) {
|
|||
}
|
||||
}
|
||||
DoArray(p, atracIDTypes, PSP_NUM_ATRAC_IDS);
|
||||
if (s < 2) {
|
||||
atracLibVersion = 0;
|
||||
atracLibCrc = 0;
|
||||
}
|
||||
else {
|
||||
Do(p, atracLibVersion);
|
||||
Do(p, atracLibCrc);
|
||||
}
|
||||
}
|
||||
|
||||
void __AtracShutdown() {
|
||||
|
@ -1971,7 +1987,6 @@ static int _AtracSetData(Atrac *atrac, u32 buffer, u32 readSize, u32 bufferSize,
|
|||
// Already logged.
|
||||
return ret;
|
||||
}
|
||||
|
||||
return hleLogSuccessInfoI(ME, successCode, "%s %s audio", codecName, channelName);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,4 +90,5 @@ typedef struct
|
|||
|
||||
u32 _AtracAddStreamData(int atracID, u32 bufPtr, u32 bytesToAdd);
|
||||
u32 _AtracDecodeData(int atracID, u8* outbuf, u32 outbufPtr, u32 *SamplesNum, u32* finish, int *remains);
|
||||
int _AtracGetIDByContext(u32 contextAddr);
|
||||
int _AtracGetIDByContext(u32 contextAddr);
|
||||
void __AtracLoadModule(int version, u32 crc);
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include "Core/HLE/sceKernelMemory.h"
|
||||
#include "Core/HLE/sceMpeg.h"
|
||||
#include "Core/HLE/scePsmf.h"
|
||||
#include "Core/HLE/sceAtrac.h"
|
||||
#include "Core/HLE/sceIo.h"
|
||||
#include "Core/HLE/KernelWaitHelpers.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
|
@ -1185,9 +1186,13 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
|
|||
if (!strcmp(head->modname, "sceMpeg_library")) {
|
||||
__MpegLoadModule(ver, module->crc);
|
||||
}
|
||||
if (!strcmp(head->modname, "scePsmfP_library") || !strcmp(head->modname, "scePsmfPlayer")) {
|
||||
__PsmfPlayerLoadModule(head->devkitversion, module->crc);
|
||||
if (!strcmp(head->modname, "scePsmfP_library") || !strcmp(head->modname, "scePsmfPlayer") || !strcmp(head->modname, "libpsmfplayer") || !strcmp(head->modname, "psmf_jk") || !strcmp(head->modname, "jkPsmfP_library")) {
|
||||
__PsmfPlayerLoadModule(devkitVersion, module->crc);
|
||||
}
|
||||
if (!strcmp(head->modname, "sceATRAC3plus_Library")) {
|
||||
__AtracLoadModule(ver, module->crc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const u8 *in = ptr;
|
||||
|
@ -1631,9 +1636,13 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
|
|||
if (!strcmp(modinfo->name, "sceMpeg_library")) {
|
||||
__MpegLoadModule(modinfo->moduleVersion, module->crc);
|
||||
}
|
||||
if (!strcmp(modinfo->name, "scePsmfP_library") || !strcmp(modinfo->name, "scePsmfPlayer")) {
|
||||
if (!strcmp(modinfo->name, "scePsmfP_library") || !strcmp(modinfo->name, "scePsmfPlayer") || !strcmp(modinfo->name, "libpsmfplayer") || !strcmp(modinfo->name, "psmf_jk") || !strcmp(modinfo->name, "jkPsmfP_library")){
|
||||
__PsmfPlayerLoadModule(devkitVersion, module->crc);
|
||||
}
|
||||
if (!strcmp(modinfo->name, "sceATRAC3plus_Library")) {
|
||||
__AtracLoadModule(modinfo->moduleVersion, module->crc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
System_Notify(SystemNotification::SYMBOL_MAP_UPDATED);
|
||||
|
|
Loading…
Add table
Reference in a new issue