This commit is contained in:
Ordinary205 2024-04-23 19:08:10 +04:00
parent 48c4ea94b1
commit 34ec85d40c
5 changed files with 35 additions and 35 deletions

View File

@ -13,11 +13,11 @@ EXPORT const char* MODULE_NAME = "libSceAudiodec";
EXPORT SYSV_ABI int32_t sceAudiodecInitLibrary(uint32_t codecType) {
LOG_USE_MODULE(libSceAudiodec);
LOG_INFO(L"InitLibrary| codecType: %P", codecType);
if (!(codecType >= Err::SCE_AUDIODEC_TYPE_AT9 && codecType <= Err::SCE_AUDIODEC_TYPE_M4AAC)) {
return Err::SCE_AUDIODEC_ERROR_INVALID_TYPE;
} else {
return 0;
if (!(codecType >= Err::SCE_AUDIODEC_TYPE_AT9 && codecType <= Err::SCE_AUDIODEC_TYPE_M4AAC)) {
return Err::SCE_AUDIODEC_ERROR_INVALID_TYPE;
} else {
return 0;
}
}
@ -29,11 +29,11 @@ EXPORT SYSV_ABI int32_t sceAudiodecClearContext(int32_t handle) {
EXPORT SYSV_ABI int32_t sceAudiodecTermLibrary(uint32_t codecType) {
LOG_USE_MODULE(libSceAudiodec);
LOG_INFO(L"TermLibrary| codecType: %P", codecType);
if (!(codecType >= Err::SCE_AUDIODEC_TYPE_AT9 && codecType <= Err::SCE_AUDIODEC_TYPE_M4AAC)) {
return Err::SCE_AUDIODEC_ERROR_INVALID_TYPE;
} else {
return 0;
if (!(codecType >= Err::SCE_AUDIODEC_TYPE_AT9 && codecType <= Err::SCE_AUDIODEC_TYPE_M4AAC)) {
return Err::SCE_AUDIODEC_ERROR_INVALID_TYPE;
} else {
return 0;
}
}
}

View File

@ -3,25 +3,25 @@
struct SceAudiodecAuInfo {
uint32_t uiSize;
void* pAuAddr;
uint32_t uiAuSize;
void* pAuAddr;
uint32_t uiAuSize;
};
struct SceAudiodecPcmItem {
uint32_t uiSize;
void* pPcmAddr;
uint32_t uiPcmSize;
void* pPcmAddr;
uint32_t uiPcmSize;
};
struct SceAudiodecCtrl {
void* pParam;
void* pBsiInfo;
SceAudiodecAuInfo* pAuInfo;
SceAudiodecPcmItem* pPcmItem;
struct SceAudiodecCtrl {
void* pParam;
void* pBsiInfo;
SceAudiodecAuInfo* pAuInfo;
SceAudiodecPcmItem* pPcmItem;
};
struct SceAudiodecCpuResource {
uint32_t uiSize;
void* pWorkMemAddr;
uint32_t uiWorkMemSize;
void* pWorkMemAddr;
uint32_t uiWorkMemSize;
};

View File

@ -3,25 +3,25 @@
struct SceAudiodecCpuAuInfo {
uint32_t uiSize;
void* pAuAddr;
uint32_t uiAuSize;
void* pAuAddr;
uint32_t uiAuSize;
};
struct SceAudiodecCpuPcmItem {
uint32_t uiSize;
void* pPcmAddr;
uint32_t uiPcmSize;
void* pPcmAddr;
uint32_t uiPcmSize;
};
struct SceAudiodecCpuCtrl {
struct SceAudiodecCpuCtrl {
void* pParam;
void* pBsiInfo;
SceAudiodecCpuAuInfo* pAuInfo;
SceAudiodecCpuPcmItem* pPcmItem;
void* pBsiInfo;
SceAudiodecCpuAuInfo* pAuInfo;
SceAudiodecCpuPcmItem* pPcmItem;
};
struct SceAudiodecCpuResource {
uint32_t uiSize;
void* pWorkMemAddr;
uint32_t uiWorkMemSize;
void* pWorkMemAddr;
uint32_t uiWorkMemSize;
};

View File

@ -2,5 +2,5 @@
#include <stdint.h>
namespace Err {
constexpr int32_t RANDOM_MAX_SIZE = 64;
constexpr int32_t RANDOM_MAX_SIZE = 64;
} // namespace Err

View File

@ -12,8 +12,8 @@ EXPORT const char* MODULE_NAME = "libSceRandom";
EXPORT SYSV_ABI int32_t sceRandomGetRandomNumber(void* buf, uint32_t size) {
LOG_USE_MODULE(libSceRandom);
if (buf == nullptr || size > Err::RANDOM_MAX_SIZE) {
return EINVAL;
}
if (buf == nullptr || size > Err::RANDOM_MAX_SIZE) {
return EINVAL;
}
}
}