mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-18 20:15:56 +00:00
Add volume_music, volume_sfx, and volume_voice sliders under the Sound tab in the F1 settings menu and in totk.ini to control background music, sound effects, and character voices independently. Classifies audio streams by file path in RomFS, parses BARS and BWAV headers for ADPCM coefficient tables and stream formats, tags decompressed Opus streams from nn::codec, and applies per-category gain factors in the audio mixer during voice rendering. Localized across English, Russian, Brazilian Portuguese, and Simplified Chinese. Documented in totk.ini.example.
28 lines
751 B
C
28 lines
751 B
C
#ifndef TOTK_AUDIO_CAT_H
|
|
#define TOTK_AUDIO_CAT_H
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
enum {
|
|
AUDIO_CAT_UNKNOWN = 0,
|
|
AUDIO_CAT_MUSIC = 1,
|
|
AUDIO_CAT_SFX = 2,
|
|
AUDIO_CAT_VOICE = 3,
|
|
};
|
|
|
|
int audio_cat_from_path(const char *path);
|
|
void audio_cat_tag_range(uint64_t addr, uint64_t size, int cat);
|
|
void audio_cat_scan_bars(uint64_t dst, uint64_t size, int fallback_cat);
|
|
void audio_cat_scan_bwav(const void *data, uint64_t size, int cat);
|
|
void audio_cat_on_opus_decode(uint64_t decoder_guest, uint64_t in_addr, uint64_t out_addr, uint64_t out_size);
|
|
int audio_cat_lookup(uint64_t addr);
|
|
int audio_cat_lookup_coef(uint64_t extra_addr, uint64_t extra_size);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|