mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-01 08:58:28 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user