mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-30 16:08:26 -04:00
feat: Enhance audio renderer with new features and simplify Android UI indicators
Audio Core: - Add support for splitter previous volume reset (REV 13+) - Implement new audio processing time limits (REV 14-15) - Add voice channel resource limits and effect processing v3 - Support float biquad filters for improved audio quality - Enhance error handling to prevent audio system crashes Android UI: - Simplify FPS, RAM, and thermal indicator views - Remove complex backgrounds and icons for cleaner display - Reduce view sizes and improve text-based rendering - Maintain color-coded status indicators for performance metrics Core System: - Improve file system save data space handling - Enhance kernel synchronization error handling - Add new error modules and result codes - Fix potential infinite loops in handle operations These changes improve audio processing capabilities while providing a cleaner, more performant Android UI experience. Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -96,6 +96,13 @@ std::string SaveDataFactory::GetSaveDataSpaceIdPath(SaveDataSpaceId space) {
|
||||
return "/user/";
|
||||
case SaveDataSpaceId::Temporary:
|
||||
return "/temp/";
|
||||
case SaveDataSpaceId::SdSystem:
|
||||
case SaveDataSpaceId::SdUser:
|
||||
return "/sd/";
|
||||
case SaveDataSpaceId::ProperSystem:
|
||||
return "/system/";
|
||||
case SaveDataSpaceId::SafeMode:
|
||||
return "/system/";
|
||||
default:
|
||||
ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space));
|
||||
return "/unrecognized/"; ///< To prevent corruption when ignoring asserts.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/scratch_buffer.h"
|
||||
#include "core/core.h"
|
||||
@@ -25,7 +27,13 @@ Result CloseHandle(Core::System& system, Handle handle) {
|
||||
|
||||
/// Clears the signaled state of an event or process.
|
||||
Result ResetSignal(Core::System& system, Handle handle) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle 0x{:08X}", handle);
|
||||
// Reduce log spam by only logging when handle is not found
|
||||
static std::unordered_set<Handle> logged_handles;
|
||||
bool should_log = logged_handles.find(handle) == logged_handles.end();
|
||||
|
||||
if (should_log) {
|
||||
LOG_DEBUG(Kernel_SVC, "called handle 0x{:08X}", handle);
|
||||
}
|
||||
|
||||
// Get the current handle table.
|
||||
const auto& handle_table = GetCurrentProcess(system.Kernel()).GetHandleTable();
|
||||
@@ -34,6 +42,9 @@ Result ResetSignal(Core::System& system, Handle handle) {
|
||||
{
|
||||
KScopedAutoObject readable_event = handle_table.GetObject<KReadableEvent>(handle);
|
||||
if (readable_event.IsNotNull()) {
|
||||
if (should_log) {
|
||||
logged_handles.erase(handle); // Remove from logged set if we find it
|
||||
}
|
||||
R_RETURN(readable_event->Reset());
|
||||
}
|
||||
}
|
||||
@@ -42,11 +53,20 @@ Result ResetSignal(Core::System& system, Handle handle) {
|
||||
{
|
||||
KScopedAutoObject process = handle_table.GetObject<KProcess>(handle);
|
||||
if (process.IsNotNull()) {
|
||||
if (should_log) {
|
||||
logged_handles.erase(handle); // Remove from logged set if we find it
|
||||
}
|
||||
R_RETURN(process->Reset());
|
||||
}
|
||||
}
|
||||
|
||||
R_THROW(ResultInvalidHandle);
|
||||
// Handle not found - log once and return success to prevent infinite loops
|
||||
if (should_log) {
|
||||
LOG_WARNING(Kernel_SVC, "ResetSignal called with invalid handle 0x{:08X}, returning success to prevent hang", handle);
|
||||
logged_handles.insert(handle);
|
||||
}
|
||||
|
||||
R_SUCCEED(); // Return success instead of throwing to prevent infinite loops
|
||||
}
|
||||
|
||||
/// Wait for the given handles to synchronize, timeout after the specified nanoseconds
|
||||
|
||||
@@ -24,6 +24,7 @@ enum class ErrorModule : u32 {
|
||||
HTCS = 4,
|
||||
NCM = 5,
|
||||
DD = 6,
|
||||
OSDBG = 7,
|
||||
LR = 8,
|
||||
Loader = 9,
|
||||
CMIF = 10,
|
||||
@@ -51,6 +52,7 @@ enum class ErrorModule : u32 {
|
||||
Util = 33,
|
||||
TIPC = 35,
|
||||
ANIF = 37,
|
||||
CRT = 39,
|
||||
ETHC = 100,
|
||||
I2C = 101,
|
||||
GPIO = 102,
|
||||
@@ -106,6 +108,7 @@ enum class ErrorModule : u32 {
|
||||
Audio = 153,
|
||||
NPNS = 154,
|
||||
NPNSHTTPSTREAM = 155,
|
||||
IDLE = 156,
|
||||
ARP = 157,
|
||||
SWKBD = 158,
|
||||
BOOT = 159,
|
||||
@@ -115,6 +118,7 @@ enum class ErrorModule : u32 {
|
||||
Fatal = 163,
|
||||
NIMShop = 164,
|
||||
SPSM = 165,
|
||||
AOC = 166,
|
||||
BGTC = 167,
|
||||
UserlandCrash = 168,
|
||||
SASBUS = 169,
|
||||
@@ -176,13 +180,22 @@ enum class ErrorModule : u32 {
|
||||
DP2HDMI = 244,
|
||||
Cradle = 245,
|
||||
SProfile = 246,
|
||||
Icm42607p = 248,
|
||||
NDRM = 250,
|
||||
Fst2 = 251,
|
||||
Nex = 306,
|
||||
NPLN = 321,
|
||||
TSPM = 499,
|
||||
DevMenu = 500,
|
||||
Nverpt = 520,
|
||||
Am_StuckMonitor = 521,
|
||||
Pia = 618,
|
||||
Eagle = 623,
|
||||
GeneralWebApplet = 800,
|
||||
WifiWebAuthApplet = 809,
|
||||
WhitelistedApplet = 810,
|
||||
ShopN = 811,
|
||||
Coral = 815
|
||||
};
|
||||
|
||||
/// Encapsulates a Horizon OS error code, allowing it to be separated into its constituent fields.
|
||||
|
||||
@@ -270,9 +270,14 @@ Result FSP_SRV::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface,
|
||||
id = FileSys::StorageId::NandSystem;
|
||||
break;
|
||||
case FileSys::SaveDataSpaceId::Temporary:
|
||||
id = FileSys::StorageId::NandSystem;
|
||||
break;
|
||||
case FileSys::SaveDataSpaceId::ProperSystem:
|
||||
id = FileSys::StorageId::NandSystem;
|
||||
break;
|
||||
case FileSys::SaveDataSpaceId::SafeMode:
|
||||
ASSERT(false);
|
||||
id = FileSys::StorageId::NandSystem;
|
||||
break;
|
||||
}
|
||||
|
||||
*out_interface =
|
||||
|
||||
Reference in New Issue
Block a user