Initialize with set_volume()

Restores volume settings with mode changes and resets.
This commit is contained in:
Daniel Arnold committed 2025-07-14 06:55:37 -06:00
1 parent 1c939997e9
commit 50d0da2aa3
4 files changed
+5

No files matched your search

+1
View File
@@ -608,6 +608,7 @@ cdrom_global_init(void)
memset(&cdrom, 0x00, sizeof(cdrom));
cdrom.error_str = cdrom_errorstr_get();
cdrom.current_sector_samples = (int16_t*)cdrom.audio_sector_buffer;
set_volume(MODE_CDVOL);
}
static void
+1
View File
@@ -1889,4 +1889,5 @@ void GUS_Setup() {
interp_set_config(interp0, 1, &cfg);
#endif
clamp_setup();
set_volume(MODE_GUSVOL);
}
+1
View File
@@ -102,6 +102,7 @@ struct audio_buffer_pool *init_audio() {
ok = audio_i2s_connect_extra(producer_pool, false, 0, 0, NULL);
assert(ok);
audio_i2s_set_enabled(true);
set_volume(MODE_PSGVOL);
return producer_pool;
}
+2
View File
@@ -146,6 +146,7 @@ void play_adlib() {
puts("starting core 1");
// flash_safe_execute_core_init();
uint32_t start, end;
set_volume(MODE_OPLVOL);
#if defined(SOUND_SB) || defined(USB_MOUSE) || defined(SOUND_MPU)
// Init PIC on this core so it handles timers
@@ -183,6 +184,7 @@ void play_adlib() {
uint32_t sb_frac = 0;
// uint32_t sb_sample_idx = 0x0;
uint32_t sb_left = 0;
set_volume(MODE_SBVOL);
#endif
uint32_t cd_left = 0;