mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 09:19:58 -04:00
Catch up after a stall of the audio renderer by rendering the owed frames without queueing them.
A frame that was not rendered when it was due stayed lost: the timer set its deadline to now once it was more than 100 ms late, and the device-paced path only filled the ring to its target again, so after every gap the sound was heard that much later than the picture it belongs to. Frames that are owed are now rendered and dropped: mixed in full, so the voices, the effects and the sinks the game reads back advance, and not queued for the device, whose queue is filled to the same target afterwards. While the device paces, what is owed is the silence it played for want of frames, counted in its own samples from an underrun until the prefill is queued again; the wait for the first prefill and anything owed across a stop do not count. On the timer a frame is owed when its deadline passed a whole frame ago. A gap of more than 3 seconds is not caught up: the sound goes on from now. NX2NAVI_AUDIO_CATCHUP=0 turns it off and keeps the old timing. The audio statistics line counts the catch-up frames and the gaps that were too long, and tests/audio_mixer_check.py checks the device's side of the accounting. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
// The device's clock paces the render thread, as the audio hardware paces the Switch's DSP (audio_mixer_pace_ns): a
|
||||
// frame is rendered when the ring holds less than the output target, max(prefill, two device periods), so the queue and
|
||||
// the delay from the game to the speakers stay there and the host and device clocks cannot drift apart.
|
||||
// When the render thread is held up the ring runs out and the device plays silence; the frames that silence stands for
|
||||
// are then rendered and dropped (audio_mixer_owed, NX2NAVI_AUDIO_CATCHUP), so the sound keeps its place against the
|
||||
// picture.
|
||||
// Without a device, while the renderer is
|
||||
// stopped and while the device takes nothing (a stall), the render thread keeps real time on its own timer; what piled
|
||||
// up meanwhile is skipped on the SDL thread once the device resumes (more than QUEUE_SLACK_MS above the target plus the
|
||||
@@ -69,6 +72,10 @@ typedef struct Mixer {
|
||||
float ring[RING_FRAMES * OUT_MAX];
|
||||
_Atomic uint64_t wr, rd, underruns, overruns, missing_frames, callback_frames, callback_nonzero, skipped_frames;
|
||||
_Atomic int playing; int ready; // ready: the callback's own state
|
||||
int gap; // the callback's own: an underrun's silence has not ended yet
|
||||
_Atomic uint64_t silent_frames; // silence played in such gaps so far (audio_mixer_owed)
|
||||
uint64_t made_up; unsigned owed_epoch; // render thread: how much of it is caught up or forgotten; the
|
||||
// stop_epoch that count belongs to
|
||||
int target, period; // output target and device period, frames (output_open)
|
||||
uint64_t stall_ns;
|
||||
_Atomic uint64_t pulled_ns; // kern_now_ns of the device's last request, 0 before the first
|
||||
@@ -282,10 +289,12 @@ static void ring_pull(Mixer *m, float *out, uint32_t frames) {
|
||||
have = wr - rd;
|
||||
m->callback_epoch = epoch;
|
||||
m->ready = 0;
|
||||
m->gap = 0;
|
||||
}
|
||||
if (!atomic_load_explicit(&m->playing, memory_order_acquire)) {
|
||||
memset(out, 0, (size_t)frames * oc * sizeof(float));
|
||||
m->ready = 0;
|
||||
m->gap = 0;
|
||||
atomic_store_explicit(&m->rd, wr, memory_order_release);
|
||||
return;
|
||||
}
|
||||
@@ -297,9 +306,13 @@ static void ring_pull(Mixer *m, float *out, uint32_t frames) {
|
||||
if (!m->ready) {
|
||||
if (have < prefill) {
|
||||
memset(out, 0, (size_t)frames * oc * sizeof(float));
|
||||
// an underrun's silence goes on until the prefill is queued again (audio_mixer_owed); the wait for the
|
||||
// first prefill after a start is not such a gap
|
||||
if (m->gap) atomic_fetch_add_explicit(&m->silent_frames, frames, memory_order_release);
|
||||
return;
|
||||
}
|
||||
m->ready = 1;
|
||||
m->gap = 0;
|
||||
}
|
||||
uint64_t keep = (prefill > (uint64_t)m->target ? prefill : (uint64_t)m->target) + frames;
|
||||
uint64_t slack = (uint64_t)m->rate * QUEUE_SLACK_MS / 1000;
|
||||
@@ -324,7 +337,9 @@ static void ring_pull(Mixer *m, float *out, uint32_t frames) {
|
||||
memset(out + (size_t)oc * n, 0, (size_t)(frames - n) * oc * sizeof(float));
|
||||
atomic_fetch_add(&m->underruns, 1);
|
||||
atomic_fetch_add(&m->missing_frames, frames - n);
|
||||
atomic_fetch_add_explicit(&m->silent_frames, frames - n, memory_order_release);
|
||||
m->ready = 0;
|
||||
m->gap = 1;
|
||||
}
|
||||
atomic_store_explicit(&m->rd, rd + n, memory_order_release);
|
||||
}
|
||||
@@ -426,6 +441,7 @@ static void channels_switch(Mixer *m, int channels) {
|
||||
atomic_store_explicit(&m->rd, atomic_load(&m->wr), memory_order_release);
|
||||
m->channels = channels;
|
||||
m->ready = 0;
|
||||
m->gap = 0;
|
||||
m->reported &= ~(1u << 6); // the device sink's line again, with the new output
|
||||
atomic_store_explicit(&m->pulled_ns, 0, memory_order_release);
|
||||
rt_log("audio: the output is now %s", channels == 6 ? "5.1" : "stereo");
|
||||
@@ -455,6 +471,7 @@ static void device_check(Mixer *m, uint64_t now) {
|
||||
m->device = 0;
|
||||
m->device_name[0] = 0;
|
||||
m->ready = 0;
|
||||
m->gap = 0;
|
||||
atomic_store_explicit(&m->pulled_ns, 0, memory_order_release);
|
||||
char err[256];
|
||||
if (stream_open(m, m->rate, SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, err, sizeof err)) {
|
||||
@@ -479,6 +496,36 @@ int64_t audio_mixer_pace_ns(AudioRenderer *r, uint64_t now) {
|
||||
return ns < 500000 ? 500000 : ns; // until the device has taken it below the target
|
||||
}
|
||||
|
||||
// Catch-up after a stall (NX2NAVI_AUDIO_CATCHUP, audren.c render_thread), for the frames the device paces. While the
|
||||
// render thread is held up the device goes on taking periods: the ring runs out and ring_pull plays silence, first for
|
||||
// the rest of that request (the underrun) and then until the prefill is queued again. The device's clock went on by
|
||||
// that silence and the game's sound did not, and audio_mixer_pace_ns only fills the ring to its target again, so
|
||||
// everything after the gap would be heard that much later than the picture it belongs to, and every further gap would
|
||||
// add to it. This says whether a whole render frame of such silence is still owed and takes it off the debt; the
|
||||
// caller renders that frame with `drop` set (audio_mixer_render), which moves the game's sound on and queues nothing,
|
||||
// so the ring is filled to the same target afterwards. The debt is counted in the device's own samples, not in host
|
||||
// time: the two clocks cannot drift into it, and a gap of less than a frame waits for the next one. Whatever was owed
|
||||
// when the renderer stopped is forgotten, and so is a debt of more than AUDIO_CATCHUP_MAX_MS, with -1 returned: after
|
||||
// that long the sound goes on from now.
|
||||
int audio_mixer_owed(AudioRenderer *r) {
|
||||
Mixer *m = r->mixer;
|
||||
if (!m || !m->device_ok) return 0;
|
||||
unsigned epoch = atomic_load_explicit(&m->stop_epoch, memory_order_acquire);
|
||||
uint64_t silent = atomic_load_explicit(&m->silent_frames, memory_order_acquire);
|
||||
if (epoch != m->owed_epoch) {
|
||||
m->owed_epoch = epoch;
|
||||
m->made_up = silent;
|
||||
}
|
||||
uint64_t owed = silent - m->made_up;
|
||||
if (owed < (uint64_t)m->frame) return 0;
|
||||
if (owed > (uint64_t)m->rate * AUDIO_CATCHUP_MAX_MS / 1000) {
|
||||
m->made_up = silent;
|
||||
return -1;
|
||||
}
|
||||
m->made_up += (uint64_t)m->frame;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int audio_mixer_out_stats(AudioRenderer *r, AudioOutStats *o) {
|
||||
Mixer *m = r->mixer;
|
||||
if (!m || !m->device_ok) return 0;
|
||||
@@ -1078,7 +1125,7 @@ static void mix_circular_sink(AudioRenderer *r,int id) {
|
||||
}
|
||||
uint32_t audio_mixer_sink_written(AudioRenderer *r,int id) {Mixer *m=r->mixer;return m?m->sink_written[id]:0;}
|
||||
|
||||
void audio_mixer_render(AudioRenderer *r, double seconds) {
|
||||
void audio_mixer_render(AudioRenderer *r, double seconds, int drop) {
|
||||
(void)seconds;
|
||||
Mixer *m = r->mixer; if (!m) return;
|
||||
const int frames = m->frame, mc = r->param.submix_count + 1;
|
||||
@@ -1256,6 +1303,10 @@ void audio_mixer_render(AudioRenderer *r, double seconds) {
|
||||
else if (r->sinks[i].type == SINK_CIRCULAR){mix_circular_sink(r,i);circular=1;}
|
||||
} else {m->sink_address[i]=0;m->sink_size[i]=m->sink_offset[i]=m->sink_old[i]=m->sink_written[i]=0;}
|
||||
if (m->channels != output_channels()) channels_switch(m, output_channels());
|
||||
// A catch-up frame (audren.c render_thread) ends here. Everything above ran, so the voices' filters and ramps, the
|
||||
// effects and the sinks the game reads back are where they would be had the frame been heard; the device gets
|
||||
// nothing of it.
|
||||
if (drop) return;
|
||||
const int oc = m->channels;
|
||||
float *out=m->output_scratch;
|
||||
memset(out, 0, sizeof(float) * (size_t)oc * (size_t)frames);
|
||||
|
||||
@@ -48,6 +48,9 @@ typedef struct AudrenStats {
|
||||
// voices (under the lock)
|
||||
uint64_t dry, late[3], late_max; // next buffer late by 1-2 passes, 3-8, 9-AS_LATE_PASSES
|
||||
uint64_t ramp_passes, ramps; // the mixer's volume ramp counts at the window's start (audio_mixer_ramp_stats)
|
||||
// catch-up (render_thread, under the lock): frames rendered and dropped; gaps over AUDIO_CATCHUP_MAX_MS, which
|
||||
// are left as they are
|
||||
uint64_t caught_up, gave_up;
|
||||
int events;
|
||||
uint64_t voices_ns; // the game's update (under the lock): the last voice census line
|
||||
int voices_most; // the most voices in use a census found
|
||||
@@ -408,7 +411,8 @@ static void request_update(AudioRenderer *r, const uint8_t *input, uint64_t in_s
|
||||
}
|
||||
|
||||
// ---- render tick: one frame each time the output device has taken the ring below its target (audio_mixer_pace_ns),
|
||||
// or every sample_count / sample_rate seconds of the host clock without a device, while stopped or while it stalls
|
||||
// or every sample_count / sample_rate seconds of the host clock without a device, while stopped or while it stalls;
|
||||
// after a stall the frames that are owed are rendered and dropped (render_thread, "Catch-up")
|
||||
static void advance_voice(AudioRenderer *r, ServerVoice *v) {
|
||||
if (!v->in.in_use || v->state != SV_STARTED || !v->in.sample_rate) return;
|
||||
uint64_t samples = audio_voice_consumed(r, v, (int)r->param.sample_count);
|
||||
@@ -509,6 +513,7 @@ static void stats_report(AudioRenderer *r, uint64_t now, uint64_t lock_ns, uint6
|
||||
st->upd_n = 0; // upd_last_ns and upd_pass_last stay: the next gap is measured from the last update
|
||||
st->upd_gap_max_ns = st->upd_gap_frame = st->upd_gaps_over = st->upd_passes_max = st->upd_hold_max_ns = 0;
|
||||
st->dry = st->late[0] = st->late[1] = st->late[2] = st->late_max = 0;
|
||||
st->caught_up = st->gave_up = 0;
|
||||
}
|
||||
plat_mutex_unlock(&r->lock);
|
||||
if (*event) rt_log("%s", event);
|
||||
@@ -516,14 +521,15 @@ static void stats_report(AudioRenderer *r, uint64_t now, uint64_t lock_ns, uint6
|
||||
const double rate = r->param.sample_rate;
|
||||
const uint64_t under = o.underruns - snap.out_underruns;
|
||||
const int bad = under || o.overruns != snap.out_overruns || o.skipped_frames != snap.out_skipped ||
|
||||
snap.gaps_over || snap.locks_over || snap.upd_gaps_over || snap.dry;
|
||||
snap.gaps_over || snap.locks_over || snap.upd_gaps_over || snap.dry || snap.caught_up ||
|
||||
snap.gave_up;
|
||||
if (!bad && snap.windows % 6 != 5) return;
|
||||
rt_log("audio: stats %.0f s to game frame %llu: device underruns %llu (%.1f ms silent), skipped %.1f ms, dropped "
|
||||
"frames %llu, ring at least %.1f ms, longest device request gap %.1f ms; render passes %llu, gaps over %llu "
|
||||
"ms %llu (longest %.1f ms), lock waits over %llu ms %llu (longest %.2f ms); game updates %llu, gaps over "
|
||||
"%llu ms %llu (longest %.1f ms at game frame %llu, %llu passes), longest held the lock %.2f ms; voices ran "
|
||||
"dry %llu, next buffer late by 1-2 passes %llu, 3-8 %llu, 9-%d %llu (most %llu); render passes that ramped a "
|
||||
"volume %llu (%llu ramps)",
|
||||
"dry %llu, next buffer late by 1-2 passes %llu, 3-8 %llu, 9-%d %llu (most %llu); render passes that ramped "
|
||||
"a volume %llu (%llu ramps); catch-up frames rendered and dropped %llu, gaps over %d ms not caught up %llu",
|
||||
(now - snap.window_ns) / 1e9, (unsigned long long)game_frame(), (unsigned long long)under,
|
||||
(o.missing_frames - snap.out_missing) * 1000.0 / rate, (o.skipped_frames - snap.out_skipped) * 1000.0 / rate,
|
||||
(unsigned long long)(o.overruns - snap.out_overruns),
|
||||
@@ -535,7 +541,8 @@ static void stats_report(AudioRenderer *r, uint64_t now, uint64_t lock_ns, uint6
|
||||
(unsigned long long)snap.upd_passes_max, snap.upd_hold_max_ns / 1e6, (unsigned long long)snap.dry,
|
||||
(unsigned long long)snap.late[0], (unsigned long long)snap.late[1], AS_LATE_PASSES,
|
||||
(unsigned long long)snap.late[2], (unsigned long long)snap.late_max,
|
||||
(unsigned long long)(ramp_passes - snap.ramp_passes), (unsigned long long)(ramps - snap.ramps));
|
||||
(unsigned long long)(ramp_passes - snap.ramp_passes), (unsigned long long)(ramps - snap.ramps),
|
||||
(unsigned long long)snap.caught_up, AUDIO_CATCHUP_MAX_MS, (unsigned long long)snap.gave_up);
|
||||
}
|
||||
|
||||
static void render_thread(void *p) {
|
||||
@@ -555,33 +562,58 @@ static void render_thread(void *p) {
|
||||
#else
|
||||
const uint64_t gap_ns = 0;
|
||||
#endif
|
||||
uint64_t next = kern_now_ns(), last = 0;
|
||||
// Catch-up (NX2NAVI_AUDIO_CATCHUP, default 1). The console's audio hardware takes a frame every 5 ms whatever the
|
||||
// rest of the system does, so the game's sound keeps its place against the picture. Here a frame that is not
|
||||
// rendered when it is due is time the sound loses for good: the device plays silence meanwhile, rendering goes on
|
||||
// where it stopped, and everything after the gap is heard that much later than the picture it belongs to. So after
|
||||
// a stall the frames that are owed are rendered and dropped: mixed in full, which moves the voices, the effects
|
||||
// and what the game reads back on as if they had been heard, and not queued for the device, whose queue is then
|
||||
// filled as before. While the device paces, it says what is owed: the silence it played for want of frames
|
||||
// (audio_mixer_owed), asked before anything is waited for or queued, so the dropped frames come right after the
|
||||
// gap. On the timer a frame is owed when its deadline passed a whole frame ago. A gap of more than
|
||||
// AUDIO_CATCHUP_MAX_MS (a debugger, the PC asleep) is not caught up: the sound goes on from now. With the setting
|
||||
// off nothing is dropped, and the timer queues frames up to 100 ms late back to back and skips a longer gap.
|
||||
const int catchup = cfg_bool("NX2NAVI_AUDIO_CATCHUP");
|
||||
const uint64_t late_max_ns = catchup ? AUDIO_CATCHUP_MAX_MS * 1000000ull : 100000000ull;
|
||||
uint64_t next = kern_now_ns(), last = 0, gave_up = 0;
|
||||
while (plat_cas32(&r->running, 0, 0)) {
|
||||
uint64_t now = kern_now_ns();
|
||||
int64_t pace = audio_mixer_pace_ns(r, now);
|
||||
if (pace > 0) {
|
||||
int drop = 0;
|
||||
if (catchup && pace >= 0) {
|
||||
int owed = audio_mixer_owed(r);
|
||||
drop = owed > 0;
|
||||
gave_up += owed < 0;
|
||||
}
|
||||
if (pace > 0 && !drop) {
|
||||
plat_wait_ns((uint64_t)pace);
|
||||
continue;
|
||||
}
|
||||
if (pace == 0 && last && now - last < gap_ns) {
|
||||
if (pace == 0 && !drop && last && now - last < gap_ns) {
|
||||
plat_wait_ns(gap_ns - (now - last));
|
||||
continue;
|
||||
}
|
||||
if (pace == 0) {
|
||||
if (pace >= 0) {
|
||||
next = now + frame_ns; // where the timer goes on if the device stops pacing
|
||||
} else {
|
||||
if (next > now) plat_wait_ns(next - now);
|
||||
else if (now - next > 100000000ull) next = now; // fell far behind (debugger, sleep): resynchronise
|
||||
else if (now - next > late_max_ns) next = now, gave_up += catchup; // fell far behind: resynchronise
|
||||
else if (catchup && now - next >= frame_ns) drop = 1;
|
||||
next += frame_ns;
|
||||
}
|
||||
const uint64_t prev = last;
|
||||
last = kern_now_ns();
|
||||
plat_mutex_lock(&r->lock);
|
||||
const uint64_t lock_ns = kern_now_ns() - last;
|
||||
if (r->stats && r->state == 0) stats_pass(r, last, lock_ns, pace == 0);
|
||||
if (r->stats && r->state == 0) {
|
||||
stats_pass(r, last, lock_ns, pace >= 0);
|
||||
r->stats->caught_up += drop;
|
||||
r->stats->gave_up += gave_up;
|
||||
gave_up = 0;
|
||||
}
|
||||
if (r->state == 0) {
|
||||
voices_prepare(r);
|
||||
audio_mixer_render(r, frame);
|
||||
audio_mixer_render(r, frame, drop);
|
||||
for (int i = 0; i < r->param.voice_count; i++) advance_voice(r, &r->voices[i]);
|
||||
r->elapsed_frames++;
|
||||
uint64_t given = r->stop_released + r->empty_played + r->flushed;
|
||||
@@ -695,12 +727,13 @@ void audren_manager_handler(IpcSession *s, const IpcRequest *rq, IpcResponse *rs
|
||||
const char *gp = cfg_get("NX2NAVI_AUDIO_GAME_PRIO");
|
||||
g_game_prio = gp && *gp ? atoi(gp) : 0;
|
||||
if (g_game_prio < 0 || g_game_prio > 2) g_game_prio = 0;
|
||||
rt_log("audio: stats %s (NX2NAVI_AUDIO_STATS); the game's audio thread %s (NX2NAVI_AUDIO_GAME_PRIO=%d)",
|
||||
rt_log("audio: stats %s (NX2NAVI_AUDIO_STATS); the game's audio thread %s (NX2NAVI_AUDIO_GAME_PRIO=%d); frames "
|
||||
"owed after a stall are %s (NX2NAVI_AUDIO_CATCHUP)",
|
||||
r->stats ? "on" : "off",
|
||||
g_game_prio == 2 ? "runs above normal priority, at the highest while its update is read"
|
||||
: g_game_prio == 1 ? "runs at the highest priority while its update is read"
|
||||
: "keeps its own priority",
|
||||
g_game_prio);
|
||||
g_game_prio, cfg_bool("NX2NAVI_AUDIO_CATCHUP") ? "rendered and dropped" : "not caught up");
|
||||
r->running = 1;
|
||||
audio_mixer_open(r);
|
||||
r->thread = plat_thread_new(render_thread, r, "audren");
|
||||
|
||||
@@ -126,6 +126,9 @@ _Static_assert(__builtin_offsetof(AudrenAuxParam, send_info) == 64, "auxiliary e
|
||||
#define AUDREN_WORK_BUFFER_BYTES 0x10000u // the host keeps its state in host memory
|
||||
#define AUDREN_BEHAVIOR_OUT 0xb0u
|
||||
#define AUDREN_RENDER_INFO_OUT 0x10u
|
||||
// Catch-up after a stall (NX2NAVI_AUDIO_CATCHUP; audren.c render_thread, audio_mixer.c audio_mixer_owed): a gap longer
|
||||
// than this is not caught up, the sound goes on from now.
|
||||
#define AUDIO_CATCHUP_MAX_MS 3000
|
||||
|
||||
// Server-side voice: the DSP's view of one client voice.
|
||||
typedef struct {
|
||||
@@ -191,11 +194,19 @@ void audio_mixer_update_routing(AudioRenderer *r, const uint8_t *splitters, uint
|
||||
void audio_mixer_update_effects(AudioRenderer *r);
|
||||
void audio_mixer_effect_result(AudioRenderer *r, int id, void *output, unsigned size);
|
||||
uint32_t audio_mixer_sink_written(AudioRenderer *r, int id);
|
||||
void audio_mixer_render(AudioRenderer *r, double seconds); // after audio_voices_prepare, before voices advance
|
||||
// After audio_voices_prepare, before voices advance. `drop`: a catch-up frame (audren.c render_thread). It is mixed in
|
||||
// full, so the voices' filters, the effects and the sinks the game reads back advance as for any frame, and nothing
|
||||
// of it is queued for the device.
|
||||
void audio_mixer_render(AudioRenderer *r, double seconds, int drop);
|
||||
// Device pacing for the render thread at kern_now_ns `now`: 0 renders the next frame now, a positive value waits that
|
||||
// many ns (the ring is at its target), -1 leaves the pace to the render thread's timer (no device, renderer stopped,
|
||||
// device stalled).
|
||||
int64_t audio_mixer_pace_ns(AudioRenderer *r, uint64_t now);
|
||||
// Catch-up for the frames the device paces (render thread, lock not held). 1: the device has played at least one render
|
||||
// frame of silence for want of rendered sound that is not made up for yet; that frame is taken off what is owed and
|
||||
// the caller renders one frame with `drop` set. 0: nothing is owed. -1: more than AUDIO_CATCHUP_MAX_MS was owed and is
|
||||
// forgotten.
|
||||
int audio_mixer_owed(AudioRenderer *r);
|
||||
// NX2NAVI_AUDIO_STATS: the output's counters since it opened, and the longest gap between two device requests since
|
||||
// the last call (which starts that measure again). False without a device.
|
||||
typedef struct { uint64_t underruns, missing_frames, skipped_frames, overruns, queued_frames, pull_gap_max_ns; } AudioOutStats;
|
||||
|
||||
@@ -35,7 +35,7 @@ static int save_ok = 1; // the last cfg_save_to wrote (o
|
||||
// logged as unknown. A new variable goes here too, or its ini key logs a harmless "unknown key" line.
|
||||
static const char *const known[] = {
|
||||
"CORES", "TM_DISPATCH", "NVN2_CS_TABLE", "SKIP_SHADERS", "MOVIE_DEBAND", "MOVIE_FPS", "MOVIE_SKIP", "MOVIE_OVERLAY", "MOVIES", "NPLN", "NVN2_PROGRAMS", "NVN_TRAP", "OCARINA_REALTIME", "ONESHOT_BUDGET", "ONESHOT_WAIT_MS", "OCARINA_STEP", "PHYSICS_STEPS", "PICKUP_COUNT", "STEP_STEADY", "VI_HZ", "VI_VRR", "TIME_DUMP", "SHADER_DUMP", "SHOT_AFTER", "SHOT_DIR", "SHOT_EVERY", // Switch 2 port: movie skip (romfs.c), NVN2 proc traps (nvn_procs.c)
|
||||
"AA", "AA_LOG", "AB", "AMIIBO_DIR", "ANISO", "APP_POOL", "ASPECT", "ASPECT_PATCH", "ASSUME_FOCUS", "ASTC", "ASTC_BC", "ASTC_TIME", "ASYNC_PREEMPT", "AUDIO", "AUDIO_CHANNELS", "AUDIO_DEVICE", "AUDIO_GAME_PRIO", "AUDIO_OFF", "AUDIO_PREFILL_MS", "AUDIO_RAMP", "AUDIO_STATS",
|
||||
"AA", "AA_LOG", "AB", "AMIIBO_DIR", "ANISO", "APP_POOL", "ASPECT", "ASPECT_PATCH", "ASSUME_FOCUS", "ASTC", "ASTC_BC", "ASTC_TIME", "ASYNC_PREEMPT", "AUDIO", "AUDIO_CATCHUP", "AUDIO_CHANNELS", "AUDIO_DEVICE", "AUDIO_GAME_PRIO", "AUDIO_OFF", "AUDIO_PREFILL_MS", "AUDIO_RAMP", "AUDIO_STATS",
|
||||
"BARRIER_GAME", "MESH_AHEAD", "MESH_FALLBACK", "MESH_FALLBACK_MB", "MESH_FALLBACK_WORKERS", "PROBE_MESHFB_DIR",
|
||||
"BACKGROUND_WINDOW", "BIND_A", "BIND_B", "BIND_DOWN", "BIND_L", "BIND_LCLICK", "BIND_LEFT", "BIND_LSTICK_DOWN", "BIND_LSTICK_LEFT",
|
||||
"BIND_LSTICK_RIGHT", "BIND_LSTICK_UP", "BIND_MINUS",
|
||||
@@ -121,7 +121,7 @@ static const struct { const char *key, *section; } sections[] = {
|
||||
{"MODS_DIR", "mods"}, {"MODS_ORDER", "mods"}, {"MODS_DISABLED", "mods"}, {"MODS_REBUILD", "mods"},
|
||||
{"MENU_LANG", "language"}, {"LANG", "language"}, {"OPERATION_MODE", "language"},
|
||||
{"VOLUME", "audio"}, {"AUDIO_CHANNELS", "audio"}, {"AUDIO_DEVICE", "audio"}, {"MICROPHONE", "audio"}, {"MENU_SOUND_VOLUME", "audio"},
|
||||
{"AUDIO_RAMP", "audio"},
|
||||
{"AUDIO_RAMP", "audio"}, {"AUDIO_CATCHUP", "audio"},
|
||||
{"MOTION", "input"}, {"RUMBLE_STRENGTH", "input"}, {"RUMBLE_CURVE", "input"}, {"RUMBLE_TRIGGERS", "input"}, {"DS3", "input"},
|
||||
{"PAD_LAYOUT", "input"}, {"PROMPTS", "input"}, {"STICK_DEADZONE", "input"}, {"LSTICK_DEADZONE", "input"}, {"RSTICK_DEADZONE", "input"},
|
||||
{"STICK_SENS", "input"}, {"DEBUG_MENU", "input"},
|
||||
@@ -233,6 +233,7 @@ static const CfgMeta metas[] = {
|
||||
{"AUDIO_DEVICE", "default", NULL, RESTART}, // default|<1-based index>|<part of a device name> (audio_mixer.c resolve_audio_device)
|
||||
{"MICROPHONE", "1", "0|1", RESTART}, // ov_audio_input.c mic_on: 0 refuses the game's input streams
|
||||
{"AUDIO_RAMP", "1", "0|1", RESTART}, // audio_mixer.c accumulate_ramp: a changed volume is reached across the frame
|
||||
{"AUDIO_CATCHUP", "1", "0|1", RESTART}, // audren.c render_thread: frames owed after a stall are rendered and dropped
|
||||
{"MOTION", "1", "0|1", LIVE}, {"RUMBLE_STRENGTH", "130", "0..300", LIVE}, {"RUMBLE_CURVE", "0.6", "0.2..1.5", LIVE},
|
||||
{"RUMBLE_TRIGGERS", "0", "0|1", LIVE}, {"PAD_LAYOUT", "nintendo", "auto|nintendo|xbox|playstation", LIVE},
|
||||
{"DS3", "0", "0|1", LIVE}, // input_ds3_win.c ds3_read: read a DualShock 3 directly; off: no HID scan
|
||||
|
||||
Reference in New Issue
Block a user