mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 21:55:57 +00:00
The music, effects and voice volumes classify nothing at their defaults, look a voice up once per wave buffer, and count unmatched sounds as effects (#722)
At 100/100/100 the RomFS, zstd and Opus hooks and the mixer lookup are skipped (audio_cat_active); the RomFS handle still keeps its category, so a stream opened earlier is classified by its later reads once a setting moves. The mixer keeps each voice's category until it moves to another wave buffer or coefficient table, instead of up to six scans of a 32768-entry ring per voice per frame; the ring is 4096 entries and lookups take its lock. zstd decodes check the BARS magic before any lookup. The guesses from BWAV headers (Opus means voice, stereo ADPCM means music) are gone: Opus streams are the DmT cutscene beds and stereo ADPCM is common among effects. Unknown Opus output counts as effects. A once-a-minute log line counts the categories while a setting is below 100. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
25f42aa84e
commit
f83fdbbd0b
9 files changed
+273
-370
No files matched your search
+4
-6
@@ -235,13 +235,11 @@ static void decode(Cpu *c, uint64_t dict, uint64_t dict_size, uint64_t ddict, ui
|
||||
return;
|
||||
}
|
||||
c->x[0] = r;
|
||||
if (r > 0) {
|
||||
int cat = audio_cat_lookup(src);
|
||||
if (cat != AUDIO_CAT_UNKNOWN || (r >= 16 && memcmp((const void *)(uintptr_t)dst, "BARS", 4) == 0)) {
|
||||
audio_cat_scan_bars(dst, (uint64_t)r, cat);
|
||||
}
|
||||
}
|
||||
count(size, r, kern_now_ns() - t0);
|
||||
// A sound bank (BARS) for the music / effects / voice volumes (audio_cat.c); its compressed bytes were tagged
|
||||
// by the RomFS read, which gives the bank's category.
|
||||
if (r >= 16 && !memcmp((const void *)(uintptr_t)dst, "BARS", 4) && audio_cat_active())
|
||||
audio_cat_scan_bars(dst, (uint64_t)r, audio_cat_lookup(src));
|
||||
}
|
||||
|
||||
static void host_multiframe(Cpu *c) { decode(c, c->x[5], c->x[6], c->x[7], GUEST_MULTIFRAME, 8); }
|
||||
|
||||
Reference in new issue
Block a user