From fdb606c8cb5c252c64917e00d0846ecf6b35d4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 13 Feb 2025 12:19:03 -0600 Subject: [PATCH] Break out sceAac from sceMp4.cpp/h --- CMakeLists.txt | 2 + Core/Core.vcxproj | 2 + Core/Core.vcxproj.filters | 6 + Core/HLE/HLETables.cpp | 2 + Core/HLE/sceAac.cpp | 267 ++++++++++++++++++++++++++++ Core/HLE/sceAac.h | 12 ++ Core/HLE/sceMp4.cpp | 242 ------------------------- Core/HLE/sceMp4.h | 7 - UWP/CoreUWP/CoreUWP.vcxproj | 2 + UWP/CoreUWP/CoreUWP.vcxproj.filters | 6 + android/jni/Android.mk | 1 + libretro/Makefile.common | 1 + 12 files changed, 301 insertions(+), 249 deletions(-) create mode 100644 Core/HLE/sceAac.cpp create mode 100644 Core/HLE/sceAac.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 6806cf42ac..15b730f326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2276,6 +2276,8 @@ add_library(${CoreLibName} ${CoreLinkType} Core/HLE/sceMt19937.h Core/HLE/sceMd5.cpp Core/HLE/sceMd5.h + Core/HLE/sceAac.cpp + Core/HLE/sceAac.h Core/HLE/sceMp4.cpp Core/HLE/sceMp4.h Core/HLE/sceMp3.cpp diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj index 28c511ae96..c38fb0c628 100644 --- a/Core/Core.vcxproj +++ b/Core/Core.vcxproj @@ -572,6 +572,7 @@ + @@ -1191,6 +1192,7 @@ + diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters index 2350b54200..9771b9d34d 100644 --- a/Core/Core.vcxproj.filters +++ b/Core/Core.vcxproj.filters @@ -1339,6 +1339,9 @@ HLE\Libraries + + HLE\Libraries + @@ -2157,6 +2160,9 @@ HLE\Libraries + + HLE\Libraries + diff --git a/Core/HLE/HLETables.cpp b/Core/HLE/HLETables.cpp index 4d974c77f5..6412586658 100644 --- a/Core/HLE/HLETables.cpp +++ b/Core/HLE/HLETables.cpp @@ -49,6 +49,7 @@ #include "sceKernelTime.h" #include "sceMd5.h" #include "sceMp4.h" +#include "sceAac.h" #include "sceMp3.h" #include "sceNet.h" #include "sceNetAdhoc.h" @@ -275,6 +276,7 @@ void RegisterAllModules() { Register_sceGameUpdate(); Register_sceDeflt(); Register_sceMp4(); + Register_sceAac(); Register_scePauth(); Register_sceNp(); Register_sceNpCommerce2(); diff --git a/Core/HLE/sceAac.cpp b/Core/HLE/sceAac.cpp new file mode 100644 index 0000000000..12861a3787 --- /dev/null +++ b/Core/HLE/sceAac.cpp @@ -0,0 +1,267 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#include "Core/HLE/sceAac.h" + +#include + +#include "Common/Serialize/SerializeFuncs.h" +#include "Common/Serialize/SerializeMap.h" +#include "Core/HLE/HLE.h" +#include "Core/HLE/FunctionWrappers.h" +#include "Core/Reporting.h" +#include "Core/HW/SimpleAudioDec.h" + +static std::map aacMap; + +static AuCtx *getAacCtx(u32 id) { + if (aacMap.find(id) == aacMap.end()) + return NULL; + return aacMap[id]; +} + +void __AACShutdown() { + for (auto it = aacMap.begin(), end = aacMap.end(); it != end; it++) { + delete it->second; + } + aacMap.clear(); +} + +void __AACDoState(PointerWrap &p) { + auto s = p.Section("sceAAC", 0, 1); + if (!s) + return; + + Do(p, aacMap); +} +static u32 sceAacExit(u32 id) +{ + INFO_LOG(Log::ME, "sceAacExit(id %i)", id); + if (aacMap.find(id) != aacMap.end()) { + delete aacMap[id]; + aacMap.erase(id); + } else { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + return 0; +} + +static u32 sceAacInit(u32 id) +{ + INFO_LOG(Log::ME, "UNIMPL sceAacInit(%08x)", id); + if (!Memory::IsValidAddress(id)) { + ERROR_LOG(Log::ME, "sceAacInit() AAC Invalid id address %08x", id); + return ERROR_AAC_INVALID_ADDRESS; + } + + AuCtx *aac = new AuCtx(); + aac->startPos = Memory::Read_U64(id); // AUDIO stream start position. + aac->endPos = Memory::Read_U32(id + 8); // AUDIO stream end position. + aac->AuBuf = Memory::Read_U32(id + 16); // Input AAC data buffer. + aac->AuBufSize = Memory::Read_U32(id + 20); // Input AAC data buffer size. + aac->PCMBuf = Memory::Read_U32(id + 24); // Output PCM data buffer. + aac->PCMBufSize = Memory::Read_U32(id + 28); // Output PCM data buffer size. + aac->freq = Memory::Read_U32(id + 32); // Frequency. + if (aac->AuBuf == 0 || aac->PCMBuf == 0) { + ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID ADDRESS AuBuf %08x PCMBuf %08x", aac->AuBuf, aac->PCMBuf); + delete aac; + return ERROR_AAC_INVALID_ADDRESS; + } + if (aac->startPos > aac->endPos) { + ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID startPos %lli endPos %lli", aac->startPos, aac->endPos); + delete aac; + return ERROR_AAC_INVALID_PARAMETER; + } + if (aac->AuBufSize < 8192 || aac->PCMBufSize < 8192) { + ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID PARAMETER, bufferSize %i outputSize %i", aac->AuBufSize, aac->PCMBufSize); + delete aac; + return ERROR_AAC_INVALID_PARAMETER; + } + if (aac->freq != 24000 && aac->freq != 32000 && aac->freq != 44100 && aac->freq != 48000) { + ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID freq %i", aac->freq); + delete aac; + return ERROR_AAC_INVALID_PARAMETER; + } + + DEBUG_LOG(Log::ME, "startPos %llx endPos %llx AuBuf %08x AuBufSize %08x PCMbuf %08x PCMbufSize %08x freq %d", + aac->startPos, aac->endPos, aac->AuBuf, aac->AuBufSize, aac->PCMBuf, aac->PCMBufSize, aac->freq); + + aac->Channels = 2; + aac->MaxOutputSample = aac->PCMBufSize / 4; + aac->SetReadPos((int)aac->startPos); + + // create aac decoder + aac->decoder = CreateAudioDecoder(PSP_CODEC_AAC); + + // close the audio if id already exist. + if (aacMap.find(id) != aacMap.end()) { + delete aacMap[id]; + aacMap.erase(id); + } + aacMap[id] = aac; + + return id; +} + +static u32 sceAacInitResource(u32 numberIds) +{ + // Do nothing here + INFO_LOG_REPORT(Log::ME, "sceAacInitResource(%i)", numberIds); + return 0; +} + +static u32 sceAacTermResource() +{ + ERROR_LOG(Log::ME, "UNIMPL sceAacTermResource()"); + return 0; +} + +static u32 sceAacDecode(u32 id, u32 pcmAddr) +{ + // return the size of output pcm, <0 error + DEBUG_LOG(Log::ME, "sceAacDecode(id %i, bufferAddress %08x)", id, pcmAddr); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->AuDecode(pcmAddr); +} + +static u32 sceAacGetLoopNum(u32 id) +{ + INFO_LOG(Log::ME, "sceAacGetLoopNum(id %i)", id); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + return ctx->LoopNum; +} + +static u32 sceAacSetLoopNum(u32 id, int loop) +{ + INFO_LOG(Log::ME, "sceAacSetLoopNum(id %i,loop %d)", id, loop); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + ctx->LoopNum = loop; + return 0; +} + +static int sceAacCheckStreamDataNeeded(u32 id) +{ + // return 1 to read more data stream, 0 don't read, <0 error + DEBUG_LOG(Log::ME, "sceAacCheckStreamDataNeeded(%i)", id); + + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->AuCheckStreamDataNeeded(); +} + +static u32 sceAacNotifyAddStreamData(u32 id, int size) +{ + // check how many bytes we have read from source file + DEBUG_LOG(Log::ME, "sceAacNotifyAddStreamData(%i, %08x)", id, size); + + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->AuNotifyAddStreamData(size); +} + +static u32 sceAacGetInfoToAddStreamData(u32 id, u32 buff, u32 size, u32 srcPos) +{ + // read from stream position srcPos of size bytes into buff + DEBUG_LOG(Log::ME, "sceAacGetInfoToAddStreamData(%08X, %08X, %08X, %08X)", id, buff, size, srcPos); + + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac handle %08x", __FUNCTION__, id); + return -1; + } + + return ctx->AuGetInfoToAddStreamData(buff, size, srcPos); +} + +static u32 sceAacGetMaxOutputSample(u32 id) +{ + DEBUG_LOG(Log::ME, "sceAacGetMaxOutputSample(id %i)", id); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->MaxOutputSample; +} + +static u32 sceAacGetSumDecodedSample(u32 id) +{ + DEBUG_LOG(Log::ME, "sceAacGetSumDecodedSample(id %i)", id); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->SumDecodedSamples; +} + +static u32 sceAacResetPlayPosition(u32 id) { + INFO_LOG(Log::ME, "sceAacResetPlayPosition(id %i)", id); + auto ctx = getAacCtx(id); + if (!ctx) { + ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); + return -1; + } + + return ctx->AuResetPlayPosition(); +} + +// 395 +const HLEFunction sceAac[] = { + {0XE0C89ACA, &WrapU_U, "sceAacInit", 'x', "x" }, + {0X33B8C009, &WrapU_U, "sceAacExit", 'x', "x" }, + {0X5CFFC57C, &WrapU_U, "sceAacInitResource", 'x', "x" }, + {0X23D35CAE, &WrapU_V, "sceAacTermResource", 'x', "" }, + {0X7E4CFEE4, &WrapU_UU, "sceAacDecode", 'x', "xx" }, + {0X523347D9, &WrapU_U, "sceAacGetLoopNum", 'x', "x" }, + {0XBBDD6403, &WrapU_UI, "sceAacSetLoopNum", 'x', "xi" }, + {0XD7C51541, &WrapI_U, "sceAacCheckStreamDataNeeded", 'i', "x" }, + {0XAC6DCBE3, &WrapU_UI, "sceAacNotifyAddStreamData", 'x', "xi" }, + {0X02098C69, &WrapU_UUUU, "sceAacGetInfoToAddStreamData", 'x', "xxxx" }, + {0X6DC7758A, &WrapU_U, "sceAacGetMaxOutputSample", 'x', "x" }, + {0X506BF66C, &WrapU_U, "sceAacGetSumDecodedSample", 'x', "x" }, + {0XD2DA2BBA, &WrapU_U, "sceAacResetPlayPosition", 'x', "x" }, +}; + +void Register_sceAac() { + RegisterModule("sceAac", ARRAY_SIZE(sceAac), sceAac); +} diff --git a/Core/HLE/sceAac.h b/Core/HLE/sceAac.h new file mode 100644 index 0000000000..6642ea045a --- /dev/null +++ b/Core/HLE/sceAac.h @@ -0,0 +1,12 @@ +#pragma once + +#include "Common/Serialize/Serializer.h" + +enum { + ERROR_AAC_INVALID_ADDRESS = 0x80691002, + ERROR_AAC_INVALID_PARAMETER = 0x80691003, +}; +void __AACShutdown(); +void __AACDoState(PointerWrap &p); + +void Register_sceAac(); diff --git a/Core/HLE/sceMp4.cpp b/Core/HLE/sceMp4.cpp index bd6cdf2f11..77c0c11308 100644 --- a/Core/HLE/sceMp4.cpp +++ b/Core/HLE/sceMp4.cpp @@ -25,29 +25,6 @@ #include "Core/HLE/sceMp4.h" #include "Core/HW/SimpleAudioDec.h" -static std::map aacMap; - -static AuCtx *getAacCtx(u32 id) { - if (aacMap.find(id) == aacMap.end()) - return NULL; - return aacMap[id]; -} - -void __AACShutdown() { - for (auto it = aacMap.begin(), end = aacMap.end(); it != end; it++) { - delete it->second; - } - aacMap.clear(); -} - -void __AACDoState(PointerWrap &p) { - auto s = p.Section("sceAAC", 0, 1); - if (!s) - return; - - Do(p, aacMap); -} - static u32 sceMp4Init() { INFO_LOG(Log::ME, "sceMp4Init()"); @@ -194,207 +171,6 @@ static u32 sceMp4SearchSyncSampleNum() } -// sceAac module starts from here - -static u32 sceAacExit(u32 id) -{ - INFO_LOG(Log::ME, "sceAacExit(id %i)", id); - if (aacMap.find(id) != aacMap.end()) { - delete aacMap[id]; - aacMap.erase(id); - } - else{ - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - return 0; -} - -static u32 sceAacInit(u32 id) -{ - INFO_LOG(Log::ME, "UNIMPL sceAacInit(%08x)", id); - if (!Memory::IsValidAddress(id)){ - ERROR_LOG(Log::ME, "sceAacInit() AAC Invalid id address %08x", id); - return ERROR_AAC_INVALID_ADDRESS; - } - - AuCtx *aac = new AuCtx(); - aac->startPos = Memory::Read_U64(id); // AUDIO stream start position. - aac->endPos = Memory::Read_U32(id + 8); // AUDIO stream end position. - aac->AuBuf = Memory::Read_U32(id + 16); // Input AAC data buffer. - aac->AuBufSize = Memory::Read_U32(id + 20); // Input AAC data buffer size. - aac->PCMBuf = Memory::Read_U32(id + 24); // Output PCM data buffer. - aac->PCMBufSize = Memory::Read_U32(id + 28); // Output PCM data buffer size. - aac->freq = Memory::Read_U32(id + 32); // Frequency. - if (aac->AuBuf == 0 || aac->PCMBuf == 0) { - ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID ADDRESS AuBuf %08x PCMBuf %08x", aac->AuBuf, aac->PCMBuf); - delete aac; - return ERROR_AAC_INVALID_ADDRESS; - } - if (aac->startPos > aac->endPos) { - ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID startPos %lli endPos %lli", aac->startPos, aac->endPos); - delete aac; - return ERROR_AAC_INVALID_PARAMETER; - } - if (aac->AuBufSize < 8192 || aac->PCMBufSize < 8192) { - ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID PARAMETER, bufferSize %i outputSize %i", aac->AuBufSize, aac->PCMBufSize); - delete aac; - return ERROR_AAC_INVALID_PARAMETER; - } - if (aac->freq != 24000 && aac->freq != 32000 && aac->freq != 44100 && aac->freq != 48000) { - ERROR_LOG(Log::ME, "sceAacInit() AAC INVALID freq %i", aac->freq); - delete aac; - return ERROR_AAC_INVALID_PARAMETER; - } - - DEBUG_LOG(Log::ME, "startPos %llx endPos %llx AuBuf %08x AuBufSize %08x PCMbuf %08x PCMbufSize %08x freq %d", - aac->startPos, aac->endPos, aac->AuBuf, aac->AuBufSize, aac->PCMBuf, aac->PCMBufSize, aac->freq); - - aac->Channels = 2; - aac->MaxOutputSample = aac->PCMBufSize / 4; - aac->SetReadPos((int)aac->startPos); - - // create aac decoder - aac->decoder = CreateAudioDecoder(PSP_CODEC_AAC); - - // close the audio if id already exist. - if (aacMap.find(id) != aacMap.end()) { - delete aacMap[id]; - aacMap.erase(id); - } - aacMap[id] = aac; - - return id; -} - -static u32 sceAacInitResource(u32 numberIds) -{ - // Do nothing here - INFO_LOG_REPORT(Log::ME, "sceAacInitResource(%i)", numberIds); - return 0; -} - -static u32 sceAacTermResource() -{ - ERROR_LOG(Log::ME, "UNIMPL sceAacTermResource()"); - return 0; -} - -static u32 sceAacDecode(u32 id, u32 pcmAddr) -{ - // return the size of output pcm, <0 error - DEBUG_LOG(Log::ME, "sceAacDecode(id %i, bufferAddress %08x)", id, pcmAddr); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->AuDecode(pcmAddr); -} - -static u32 sceAacGetLoopNum(u32 id) -{ - INFO_LOG(Log::ME, "sceAacGetLoopNum(id %i)", id); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - return ctx->LoopNum; -} - -static u32 sceAacSetLoopNum(u32 id, int loop) -{ - INFO_LOG(Log::ME, "sceAacSetLoopNum(id %i,loop %d)", id, loop); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - ctx->LoopNum = loop; - return 0; -} - -static int sceAacCheckStreamDataNeeded(u32 id) -{ - // return 1 to read more data stream, 0 don't read, <0 error - DEBUG_LOG(Log::ME, "sceAacCheckStreamDataNeeded(%i)", id); - - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->AuCheckStreamDataNeeded(); -} - -static u32 sceAacNotifyAddStreamData(u32 id, int size) -{ - // check how many bytes we have read from source file - DEBUG_LOG(Log::ME, "sceAacNotifyAddStreamData(%i, %08x)", id, size); - - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->AuNotifyAddStreamData(size); -} - -static u32 sceAacGetInfoToAddStreamData(u32 id, u32 buff, u32 size, u32 srcPos) -{ - // read from stream position srcPos of size bytes into buff - DEBUG_LOG(Log::ME, "sceAacGetInfoToAddStreamData(%08X, %08X, %08X, %08X)", id, buff, size, srcPos); - - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac handle %08x", __FUNCTION__, id); - return -1; - } - - return ctx->AuGetInfoToAddStreamData(buff, size, srcPos); -} - -static u32 sceAacGetMaxOutputSample(u32 id) -{ - DEBUG_LOG(Log::ME, "sceAacGetMaxOutputSample(id %i)", id); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->MaxOutputSample; -} - -static u32 sceAacGetSumDecodedSample(u32 id) -{ - DEBUG_LOG(Log::ME, "sceAacGetSumDecodedSample(id %i)", id); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->SumDecodedSamples; -} - -static u32 sceAacResetPlayPosition(u32 id) -{ - INFO_LOG(Log::ME, "sceAacResetPlayPosition(id %i)", id); - auto ctx = getAacCtx(id); - if (!ctx) { - ERROR_LOG(Log::ME, "%s: bad aac id %08x", __FUNCTION__, id); - return -1; - } - - return ctx->AuResetPlayPosition(); -} - static u32 mp4msv_3C2183C7(u32 unknown1, u32 unknown2) { ERROR_LOG(Log::ME, "UNIMPL mp4msv_3C2183C7(%d, %x)", unknown1, unknown2); return 0; @@ -448,23 +224,6 @@ const HLEFunction sceMp4[] = {0X9CA13D1A, nullptr, "mp4msv_9CA13D1A", '?', "" }, }; -// 395 -const HLEFunction sceAac[] = { - {0XE0C89ACA, &WrapU_U, "sceAacInit", 'x', "x" }, - {0X33B8C009, &WrapU_U, "sceAacExit", 'x', "x" }, - {0X5CFFC57C, &WrapU_U, "sceAacInitResource", 'x', "x" }, - {0X23D35CAE, &WrapU_V, "sceAacTermResource", 'x', "" }, - {0X7E4CFEE4, &WrapU_UU, "sceAacDecode", 'x', "xx" }, - {0X523347D9, &WrapU_U, "sceAacGetLoopNum", 'x', "x" }, - {0XBBDD6403, &WrapU_UI, "sceAacSetLoopNum", 'x', "xi" }, - {0XD7C51541, &WrapI_U, "sceAacCheckStreamDataNeeded", 'i', "x" }, - {0XAC6DCBE3, &WrapU_UI, "sceAacNotifyAddStreamData", 'x', "xi" }, - {0X02098C69, &WrapU_UUUU, "sceAacGetInfoToAddStreamData", 'x', "xxxx" }, - {0X6DC7758A, &WrapU_U, "sceAacGetMaxOutputSample", 'x', "x" }, - {0X506BF66C, &WrapU_U, "sceAacGetSumDecodedSample", 'x', "x" }, - {0XD2DA2BBA, &WrapU_U, "sceAacResetPlayPosition", 'x', "x" }, -}; - const HLEFunction mp4msv[] = { {0x3C2183C7, &WrapU_UU, "mp4msv_3C2183C7", 'x', "xx" }, {0x9CA13D1A, &WrapU_UU, "mp4msv_9CA13D1A", 'x', "xx" }, @@ -474,7 +233,6 @@ const HLEFunction mp4msv[] = { void Register_sceMp4() { RegisterModule("sceMp4", ARRAY_SIZE(sceMp4), sceMp4); - RegisterModule("sceAac", ARRAY_SIZE(sceAac), sceAac); } void Register_mp4msv() diff --git a/Core/HLE/sceMp4.h b/Core/HLE/sceMp4.h index 9df50ed96f..ee43ac89d4 100644 --- a/Core/HLE/sceMp4.h +++ b/Core/HLE/sceMp4.h @@ -17,12 +17,5 @@ #pragma once -enum { - ERROR_AAC_INVALID_ADDRESS = 0x80691002, - ERROR_AAC_INVALID_PARAMETER = 0x80691003, -}; - void Register_sceMp4(); -void __AACShutdown(); -void __AACDoState(PointerWrap &p); void Register_mp4msv(); diff --git a/UWP/CoreUWP/CoreUWP.vcxproj b/UWP/CoreUWP/CoreUWP.vcxproj index fdaf2089e6..197d4dbe3a 100644 --- a/UWP/CoreUWP/CoreUWP.vcxproj +++ b/UWP/CoreUWP/CoreUWP.vcxproj @@ -231,6 +231,7 @@ + @@ -491,6 +492,7 @@ + diff --git a/UWP/CoreUWP/CoreUWP.vcxproj.filters b/UWP/CoreUWP/CoreUWP.vcxproj.filters index d5252caeda..645ab2e4f6 100644 --- a/UWP/CoreUWP/CoreUWP.vcxproj.filters +++ b/UWP/CoreUWP/CoreUWP.vcxproj.filters @@ -450,6 +450,9 @@ HLE + + HLE + HLE @@ -1540,6 +1543,9 @@ HLE + + HLE + HLE diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 0a0d520179..95b758d9a0 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -705,6 +705,7 @@ EXEC_AND_LIB_FILES := \ $(SRC)/Core/HLE/sceMpeg.cpp \ $(SRC)/Core/HLE/sceMd5.cpp \ $(SRC)/Core/HLE/sceMp4.cpp \ + $(SRC)/Core/HLE/sceAac.cpp \ $(SRC)/Core/HLE/sceMp3.cpp \ $(SRC)/Core/HLE/sceNet.cpp \ $(SRC)/Core/HLE/sceNet_lib.cpp \ diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 77f9ac045d..32f7f08d35 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -751,6 +751,7 @@ SOURCES_CXX += \ $(COREDIR)/HLE/sceP3da.cpp \ $(COREDIR)/HLE/sceMt19937.cpp \ $(COREDIR)/HLE/sceMd5.cpp \ + $(COREDIR)/HLE/sceAac.cpp \ $(COREDIR)/HLE/sceMp4.cpp \ $(COREDIR)/HLE/sceMp3.cpp \ $(COREDIR)/HLE/sceParseHttp.cpp \