mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
libSceCesCs goes to 17 of 17: three-byte EUC-JP JIS X 0212 (0x8F) characters convert through a table read from the Unicode consortium's JIS0212.TXT, both directions, so sceCesEucJpToUcs2, the MbcsStrTo* and *Get*Len forms and the context conversions accept them, and a character with cells in both JIS X 0208 and JIS X 0212 still encodes to the two-byte form. sceCesRefersUcsProfileCp1250 returns a profile with the Windows-1250 table of Microsoft's bestfit1250.txt, accepted by the SBC and context conversions. The AudioOut HDMI bitstream Sys family follows the Ex ports: SysOpen opens a port only for mode 5, the TrueHD MAT route EVO-PLAYER-PS5 reads from the firmware 12.70 mode tables, paced at 192 kHz with no host device; SysConfigureOutput accepts the observed HDMI MAT switch; SysClose closes a Sys port. sceAudioOut2MasteringGetState fills the states by states id with the descriptors KytyPS5 declares, SetParam answers a null parameter with the mastering invalid-API-parameter error, Set3DLatency follows KytyPS5's output validation (0x80268001 above 2, any user), SetSystemDebugState records the debug state id, and GetSpeakerArrayCoefficients returns the front pair KytyPS5 and prosper both return. sceAudioInOpen accepts param 0x10 as float mono like KytyPS5; HqOpen answers a longer grain or a lower rate with the invalid-size and invalid-frequency errors; AsyncOpen also accepts the 384-sample grain SharpProspero documents. sceGameUpdateGetAddcontLatestVersion answers a null entitlement label with 0x80412803, as prosper does.
67 lines
2.9 KiB
C++
67 lines
2.9 KiB
C++
#include <cstdint>
|
|
#include <cstring>
|
|
#include "SceTypes.hpp"
|
|
#include "prx/libc/include/General.hpp"
|
|
|
|
namespace {
|
|
|
|
constexpr int SCE_AUDIO_OUT2_ERROR_MASTERING_INVALID_API_PARAM = static_cast<int>(0x80268201);
|
|
constexpr int SCE_AUDIO_OUT2_ERROR_MASTERING_INVALID_STATES_ID = static_cast<int>(0x80268204);
|
|
constexpr std::uint32_t AUDIO_OUT2_MASTERING_STATES_ID_DEFAULT = 1;
|
|
constexpr std::uint32_t AUDIO_OUT2_MASTERING_STATES_ID_V2 = 2;
|
|
constexpr std::uint32_t AUDIO_OUT2_MASTERING_STRUCT_ID_COMPRESSOR_DEFAULT = 0x01010001;
|
|
constexpr std::uint32_t AUDIO_OUT2_MASTERING_STRUCT_ID_COMPRESSOR_V2 = 0x01020001;
|
|
constexpr std::uint32_t AUDIO_OUT2_MASTERING_STRUCT_ID_LIMITER_DEFAULT = 0x01010003;
|
|
|
|
}
|
|
|
|
extern "C" {
|
|
|
|
int APS5_VABI sceAudioOut2MasteringInit(uint32_t flags) {
|
|
if (flags != 0) NotImplemented_nid_no_patch(__func__);
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceAudioOut2MasteringTerm(void) {
|
|
return 0;
|
|
}
|
|
|
|
int APS5_VABI sceAudioOut2MasteringGetState(AudioOut2MasteringStatesHeader* state, uint32_t output, AudioOut2UserHandle user) {
|
|
(void)output;
|
|
(void)user;
|
|
if (state == nullptr) return SCE_AUDIO_OUT2_ERROR_MASTERING_INVALID_API_PARAM;
|
|
switch (state->states_id) {
|
|
case AUDIO_OUT2_MASTERING_STATES_ID_DEFAULT: {
|
|
auto* full = static_cast<AudioOut2MasteringStates*>(static_cast<void*>(state));
|
|
std::memset(full, 0, sizeof(*full));
|
|
full->states_header.states_id = AUDIO_OUT2_MASTERING_STATES_ID_DEFAULT;
|
|
full->compressor_states.descriptor.id = AUDIO_OUT2_MASTERING_STRUCT_ID_COMPRESSOR_DEFAULT;
|
|
full->compressor_states.descriptor.size = sizeof(AudioOut2MasteringCompressorStates);
|
|
full->limiter_states.descriptor.id = AUDIO_OUT2_MASTERING_STRUCT_ID_LIMITER_DEFAULT;
|
|
full->limiter_states.descriptor.size = sizeof(AudioOut2MasteringLimiterStates);
|
|
return 0;
|
|
}
|
|
case AUDIO_OUT2_MASTERING_STATES_ID_V2: {
|
|
auto* full = static_cast<AudioOut2MasteringStatesV2*>(static_cast<void*>(state));
|
|
std::memset(full, 0, sizeof(*full));
|
|
full->states_header.states_id = AUDIO_OUT2_MASTERING_STATES_ID_V2;
|
|
full->compressor_states.descriptor.id = AUDIO_OUT2_MASTERING_STRUCT_ID_COMPRESSOR_V2;
|
|
full->compressor_states.descriptor.size = sizeof(AudioOut2MasteringCompressorStatesV2);
|
|
full->limiter_states.descriptor.id = AUDIO_OUT2_MASTERING_STRUCT_ID_LIMITER_DEFAULT;
|
|
full->limiter_states.descriptor.size = sizeof(AudioOut2MasteringLimiterStates);
|
|
return 0;
|
|
}
|
|
default:
|
|
return SCE_AUDIO_OUT2_ERROR_MASTERING_INVALID_STATES_ID;
|
|
}
|
|
}
|
|
|
|
int APS5_VABI sceAudioOut2MasteringSetParam(const AudioOut2MasteringParamsHeader* param, uint32_t output, uint32_t flags) {
|
|
(void)output;
|
|
(void)flags;
|
|
if (param == nullptr) return SCE_AUDIO_OUT2_ERROR_MASTERING_INVALID_API_PARAM;
|
|
return 0;
|
|
}
|
|
|
|
}
|