mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Add simple AT3 dumping (non-streaming only)
This commit is contained in:
1 parent
ef4e04c8a1
commit
c5ad1548bc
3 files changed
+13
-2
No files matched your search
@@ -592,6 +592,8 @@ void AtracBase::CreateDecoder(int codecType, int bytesPerFrame, int channels) {
|
||||
|
||||
// First, init the standalone decoder.
|
||||
if (codecType == PSP_MODE_AT_3) {
|
||||
// TODO: This is maybe not entirely reliable? Mui Mui house in LocoRoco 2 fails. Although also fails
|
||||
// when I override this, so maybe the issue is something different...
|
||||
bool jointStereo = IsAtrac3StreamJointStereo(codecType, bytesPerFrame, channels);
|
||||
|
||||
// We don't pull this from the RIFF so that we can support OMA also.
|
||||
|
||||
+10
-2
@@ -6,6 +6,7 @@
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HLE/FunctionWrappers.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/AtracCtx2.h"
|
||||
#include "Core/HW/Atrac3Standalone.h"
|
||||
|
||||
@@ -807,6 +808,13 @@ int Atrac2::SetData(const Track &track, u32 bufferAddr, u32 readSize, u32 buffer
|
||||
INFO_LOG(Log::ME, "Atrac2::SetData: outputChannels %d doesn't match track_.channels %d, decoder will expand.", outputChannels, track.channels);
|
||||
}
|
||||
|
||||
if (readSize >= track.fileSize) {
|
||||
INFO_LOG(Log::ME, "The full file was set directly - we can dump it.");
|
||||
char filename[512];
|
||||
snprintf(filename, sizeof(filename), "%s_%d%s", track.codecType == PSP_MODE_AT_3 ? "at3" : "at3plus", track.endSample, track.channels == 1 ? "_mono" : "");
|
||||
DumpFileIfEnabled(Memory::GetPointer(bufferAddr), readSize, filename, DumpFileType::Atrac3);
|
||||
}
|
||||
|
||||
CreateDecoder(track.codecType, track.bytesPerFrame, track.channels);
|
||||
|
||||
outputChannels_ = outputChannels;
|
||||
@@ -916,12 +924,12 @@ void Atrac2::WrapLastPacket() {
|
||||
u32 Atrac2::SkipFrames(int *skipCount) {
|
||||
SceAtracIdInfo &info = context_->info;
|
||||
*skipCount = 0;
|
||||
u32 temp;
|
||||
u32 finishIgnored;
|
||||
while (true) {
|
||||
if (info.numSkipFrames == 0) {
|
||||
return 0;
|
||||
}
|
||||
u32 retval = DecodeInternal(0, 0, &temp);
|
||||
u32 retval = DecodeInternal(0, 0, &finishIgnored);
|
||||
if (retval != 0) {
|
||||
if (retval == SCE_ERROR_ATRAC_API_FAIL) {
|
||||
(*skipCount)++;
|
||||
|
||||
@@ -1982,6 +1982,7 @@ void DeveloperToolsScreen::CreateViews() {
|
||||
list->Add(new ItemHeader("Dump file types"));
|
||||
list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::EBOOT, dev->T("Dump Decrypted Eboot", "Dump Decrypted EBOOT.BIN (If Encrypted) When Booting Game")));
|
||||
list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::PRX, dev->T("PRX")));
|
||||
list->Add(new BitCheckBox(&g_Config.iDumpFileTypes, (int)DumpFileType::Atrac3, dev->T("Atrac3/3+")));
|
||||
|
||||
#if !PPSSPP_PLATFORM(ANDROID) && !PPSSPP_PLATFORM(IOS) && !PPSSPP_PLATFORM(SWITCH)
|
||||
list->Add(new ItemHeader(dev->T("MIPSTracer")));
|
||||
|
||||
Reference in new issue
Block a user