From 49dc1e34953aa031e83b84a965aff7a4cd819a7d Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Thu, 11 Jun 2020 22:39:13 -0500 Subject: [PATCH 1/6] Added music volume config --- include/text_options_strings.h.in | 1 + src/audio/external.c | 18 +++++++++++++++++- src/audio/external.h | 1 + src/game/options_menu.c | 2 ++ src/pc/configfile.c | 2 ++ src/pc/configfile.h | 1 + src/pc/pc_main.c | 15 +++++++++------ 7 files changed, 33 insertions(+), 7 deletions(-) diff --git a/include/text_options_strings.h.in b/include/text_options_strings.h.in index 2941bde1..9dbce068 100644 --- a/include/text_options_strings.h.in +++ b/include/text_options_strings.h.in @@ -105,6 +105,7 @@ #define TEXT_OPT_NEAREST _("Nearest") #define TEXT_OPT_LINEAR _("Linear") #define TEXT_OPT_MVOLUME _("Master Volume") +#define TEXT_OPT_TMUSIC _("Music Volume") #define TEXT_OPT_VSYNC _("Vertical Sync") #define TEXT_OPT_DOUBLE _("Double") #define TEXT_RESET_WINDOW _("Reset Window") diff --git a/src/audio/external.c b/src/audio/external.c index a059c0b5..4c37f8ad 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -15,6 +15,7 @@ #include "seq_ids.h" #include "dialog_ids.h" #include "level_table.h" +#include "pc/configfile.h" #ifdef VERSION_EU #define EU_FLOAT(x) x ## f @@ -2061,6 +2062,20 @@ void play_dialog_sound(u8 dialogID) { #endif } +void setBackgroundMusicVolume(f32 volume){ + bool needsToUpdate = false; + for(int i = 0; i < 16; i++){ + f32 currentVolume = gSequencePlayers[SEQ_PLAYER_LEVEL].channels[i]->volume; + if(volume != currentVolume){ + gSequencePlayers[SEQ_PLAYER_LEVEL].channels[i]->volume = volume; + needsToUpdate = true; + } + } + if(needsToUpdate){ + update_game_sound(); + } +} + void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { u8 seqId = seqArgs & 0xff; u8 priority = seqArgs >> 8; @@ -2069,11 +2084,12 @@ void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { // Except for the background music player, we don't support queued // sequences. Just play them immediately, stopping any old sequence. + if (player != 0) { play_sequence(player, seqId, fadeTimer); return; } - + // Abort if the queue is already full. if (sBackgroundMusicQueueSize == MAX_BG_MUSIC_QUEUE_SIZE) { return; diff --git a/src/audio/external.h b/src/audio/external.h index 2a8d0e6d..2cc97b1f 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -37,6 +37,7 @@ void sound_banks_disable(u8 player, u16 bankMask); void sound_banks_enable(u8 player, u16 bankMask); void func_80320A4C(u8 bankIndex, u8 arg1); void play_dialog_sound(u8 dialogID); +void setBackgroundMusicVolume(f32 volume); void play_music(u8 player, u16 seqArgs, u16 fadeTimer); void stop_background_music(u16 seqId); void fadeout_background_music(u16 arg0, u16 fadeOut); diff --git a/src/game/options_menu.c b/src/game/options_menu.c index d37b6afe..c0a0c847 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -84,6 +84,7 @@ static const u8 optsVideoStr[][32] = { static const u8 optsAudioStr[][32] = { { TEXT_OPT_MVOLUME }, + { TEXT_OPT_TMUSIC }, }; static const u8 optsCheatsStr[][64] = { @@ -251,6 +252,7 @@ static struct Option optsVideo[] = { static struct Option optsAudio[] = { DEF_OPT_SCROLL( optsAudioStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 ), + DEF_OPT_SCROLL( optsAudioStr[1], &configMusicVolume, 0, 100, 1), }; static struct Option optsCheats[] = { diff --git a/src/pc/configfile.c b/src/pc/configfile.c index db420112..46e1ca5b 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -57,6 +57,7 @@ ConfigWindow configWindow = { }; unsigned int configFiltering = 1; // 0=force nearest, 1=linear, (TODO) 2=three-point unsigned int configMasterVolume = MAX_VOLUME; // 0 - MAX_VOLUME +unsigned int configMusicVolume = 100; // Keyboard mappings (VK_ values, by default keyboard/gamepad/mouse) unsigned int configKeyA[MAX_BINDS] = { 0x0026, 0x1000, 0x1103 }; @@ -105,6 +106,7 @@ static const struct ConfigOption options[] = { {.name = "vsync", .type = CONFIG_TYPE_UINT, .uintValue = &configWindow.vsync}, {.name = "texture_filtering", .type = CONFIG_TYPE_UINT, .uintValue = &configFiltering}, {.name = "master_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, + {.name = "music_enabled", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, {.name = "key_a", .type = CONFIG_TYPE_BIND, .uintValue = configKeyA}, {.name = "key_b", .type = CONFIG_TYPE_BIND, .uintValue = configKeyB}, {.name = "key_start", .type = CONFIG_TYPE_BIND, .uintValue = configKeyStart}, diff --git a/src/pc/configfile.h b/src/pc/configfile.h index 48d65379..0c2960f8 100644 --- a/src/pc/configfile.h +++ b/src/pc/configfile.h @@ -21,6 +21,7 @@ typedef struct { extern ConfigWindow configWindow; extern unsigned int configFiltering; extern unsigned int configMasterVolume; +extern unsigned int configMusicVolume; extern unsigned int configKeyA[]; extern unsigned int configKeyB[]; extern unsigned int configKeyStart[]; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index dc85b17e..3cab9eb8 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -67,11 +67,12 @@ void send_display_list(struct SPTask *spTask) { #define printf -void produce_one_frame(void) { +void produce_one_frame(void) { + gfx_start_frame(); game_loop_one_iteration(); - thread6_rumble_loop(NULL); - + thread6_rumble_loop(NULL); + int samples_left = audio_api->buffered(); u32 num_audio_samples = samples_left < audio_api->get_desired_buffered() ? 544 : 528; //printf("Audio samples: %d %u\n", samples_left, num_audio_samples); @@ -83,15 +84,17 @@ void produce_one_frame(void) { u32 num_audio_samples = audio_cnt < 2 ? 528 : 544;*/ create_next_audio_buffer(audio_buffer + i * (num_audio_samples * 2), num_audio_samples); } - //printf("Audio samples before submitting: %d\n", audio_api->buffered()); + //printf("Audio samples before submitting: %d\n", audio_api->buffered()); + + setBackgroundMusicVolume(configMusicVolume / 100.0); // scale by master volume (0-127) const s32 mod = (s32)configMasterVolume; for (u32 i = 0; i < num_audio_samples * 4; ++i) - audio_buffer[i] = ((s32)audio_buffer[i] * mod) >> VOLUME_SHIFT; + audio_buffer[i] = ((s32)audio_buffer[i] * mod) >> VOLUME_SHIFT; audio_api->play((u8*)audio_buffer, 2 * num_audio_samples * 4); - + gfx_end_frame(); } From a632ee21ff44ee64b2c7ade5e2f88a605f754bae Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Fri, 12 Jun 2020 00:53:40 -0500 Subject: [PATCH 2/6] Changed configfile variable name *Changed from music_enabled to music_volume --- src/pc/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/configfile.c b/src/pc/configfile.c index f5b80a87..f24e53d4 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -100,7 +100,7 @@ static const struct ConfigOption options[] = { {.name = "vsync", .type = CONFIG_TYPE_UINT, .uintValue = &configWindow.vsync}, {.name = "texture_filtering", .type = CONFIG_TYPE_UINT, .uintValue = &configFiltering}, {.name = "master_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, - {.name = "music_enabled", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, + {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, {.name = "key_a", .type = CONFIG_TYPE_BIND, .uintValue = configKeyA}, {.name = "key_b", .type = CONFIG_TYPE_BIND, .uintValue = configKeyB}, {.name = "key_start", .type = CONFIG_TYPE_BIND, .uintValue = configKeyStart}, From 66923e05afc109fff39cab0bc0c037fcafd5f49a Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Fri, 12 Jun 2020 00:55:21 -0500 Subject: [PATCH 3/6] Changed configfile variable value *Changed from configMasterVolume to configMusicVolume --- src/pc/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/configfile.c b/src/pc/configfile.c index f24e53d4..7b1ce1a8 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -100,7 +100,7 @@ static const struct ConfigOption options[] = { {.name = "vsync", .type = CONFIG_TYPE_UINT, .uintValue = &configWindow.vsync}, {.name = "texture_filtering", .type = CONFIG_TYPE_UINT, .uintValue = &configFiltering}, {.name = "master_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, - {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, + {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMusicVolume}, {.name = "key_a", .type = CONFIG_TYPE_BIND, .uintValue = configKeyA}, {.name = "key_b", .type = CONFIG_TYPE_BIND, .uintValue = configKeyB}, {.name = "key_start", .type = CONFIG_TYPE_BIND, .uintValue = configKeyStart}, From 56c6590bf3f73c84a9703240e5701ce6fd1f0e64 Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Fri, 12 Jun 2020 00:56:51 -0500 Subject: [PATCH 4/6] Fixed config indentation --- src/pc/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/configfile.c b/src/pc/configfile.c index 7b1ce1a8..a3055f73 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -100,7 +100,7 @@ static const struct ConfigOption options[] = { {.name = "vsync", .type = CONFIG_TYPE_UINT, .uintValue = &configWindow.vsync}, {.name = "texture_filtering", .type = CONFIG_TYPE_UINT, .uintValue = &configFiltering}, {.name = "master_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, - {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMusicVolume}, + {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMusicVolume}, {.name = "key_a", .type = CONFIG_TYPE_BIND, .uintValue = configKeyA}, {.name = "key_b", .type = CONFIG_TYPE_BIND, .uintValue = configKeyB}, {.name = "key_start", .type = CONFIG_TYPE_BIND, .uintValue = configKeyStart}, From 7c341334f0d8e78ac585b16c1b9d35dba0c143d3 Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Fri, 12 Jun 2020 03:22:08 -0500 Subject: [PATCH 5/6] Code cleanup & changed max volume to 127 --- src/audio/external.c | 14 ++------------ src/audio/external.h | 2 +- src/audio/seqplayer.h | 1 + src/game/options_menu.c | 2 +- src/pc/configfile.c | 2 +- src/pc/pc_main.c | 7 ++++--- 6 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/audio/external.c b/src/audio/external.c index 4c37f8ad..9f28ec32 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -2062,18 +2062,8 @@ void play_dialog_sound(u8 dialogID) { #endif } -void setBackgroundMusicVolume(f32 volume){ - bool needsToUpdate = false; - for(int i = 0; i < 16; i++){ - f32 currentVolume = gSequencePlayers[SEQ_PLAYER_LEVEL].channels[i]->volume; - if(volume != currentVolume){ - gSequencePlayers[SEQ_PLAYER_LEVEL].channels[i]->volume = volume; - needsToUpdate = true; - } - } - if(needsToUpdate){ - update_game_sound(); - } +void setBackgroundMusicVolume(s32 volume){ + func_8031D838(SEQ_PLAYER_LEVEL, 0, volume); } void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { diff --git a/src/audio/external.h b/src/audio/external.h index 2cc97b1f..ef902a51 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -37,7 +37,7 @@ void sound_banks_disable(u8 player, u16 bankMask); void sound_banks_enable(u8 player, u16 bankMask); void func_80320A4C(u8 bankIndex, u8 arg1); void play_dialog_sound(u8 dialogID); -void setBackgroundMusicVolume(f32 volume); +void setBackgroundMusicVolume(s32 volume); void play_music(u8 player, u16 seqArgs, u16 fadeTimer); void stop_background_music(u16 seqId); void fadeout_background_music(u16 arg0, u16 fadeOut); diff --git a/src/audio/seqplayer.h b/src/audio/seqplayer.h index 7d91faeb..005b5193 100644 --- a/src/audio/seqplayer.h +++ b/src/audio/seqplayer.h @@ -9,6 +9,7 @@ void sequence_channel_disable(struct SequenceChannel *seqPlayer); void sequence_player_disable(struct SequencePlayer* seqPlayer); void audio_list_push_back(struct AudioListItem *list, struct AudioListItem *item); void *audio_list_pop_back(struct AudioListItem *list); +void sequence_channel_set_volume(struct SequenceChannel *seqChannel, u8 volume); void process_sequences(s32 iterationsRemaining); void init_sequence_player(u32 player); void init_sequence_players(void); diff --git a/src/game/options_menu.c b/src/game/options_menu.c index b82d6a22..660a6d4f 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -260,7 +260,7 @@ static struct Option optsVideo[] = { static struct Option optsAudio[] = { DEF_OPT_SCROLL( optsAudioStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 ), - DEF_OPT_SCROLL( optsAudioStr[1], &configMusicVolume, 0, 100, 1), + DEF_OPT_SCROLL( optsAudioStr[1], &configMusicVolume, 0, MAX_VOLUME, 1), }; static struct Option optsCheats[] = { diff --git a/src/pc/configfile.c b/src/pc/configfile.c index a3055f73..6a6b6bd4 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -51,7 +51,7 @@ ConfigWindow configWindow = { }; unsigned int configFiltering = 1; // 0=force nearest, 1=linear, (TODO) 2=three-point unsigned int configMasterVolume = MAX_VOLUME; // 0 - MAX_VOLUME -unsigned int configMusicVolume = 100; +unsigned int configMusicVolume = MAX_VOLUME; // Keyboard mappings (VK_ values, by default keyboard/gamepad/mouse) unsigned int configKeyA[MAX_BINDS] = { 0x0026, 0x1000, 0x1103 }; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 3db52ed1..8843930f 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -73,6 +73,9 @@ void send_display_list(struct SPTask *spTask) { void produce_one_frame(void) { gfx_start_frame(); + + setBackgroundMusicVolume((s32)configMusicVolume); + game_loop_one_iteration(); thread6_rumble_loop(NULL); @@ -87,9 +90,7 @@ void produce_one_frame(void) { u32 num_audio_samples = audio_cnt < 2 ? 528 : 544;*/ create_next_audio_buffer(audio_buffer + i * (num_audio_samples * 2), num_audio_samples); } - //printf("Audio samples before submitting: %d\n", audio_api->buffered()); - - setBackgroundMusicVolume(configMusicVolume / 100.0); + //printf("Audio samples before submitting: %d\n", audio_api->buffered()); // scale by master volume (0-127) const s32 mod = (s32)configMasterVolume; From b15bd727c2326e6fe10a92cc08b2eff778c97727 Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Sat, 13 Jun 2020 02:16:00 -0500 Subject: [PATCH 6/6] Added sfx and env volume settings --- include/text_options_strings.h.in | 4 +++- src/audio/external.c | 4 ++-- src/audio/external.h | 2 +- src/game/options_menu.c | 8 ++++++-- src/pc/configfile.c | 4 ++++ src/pc/configfile.h | 2 ++ src/pc/pc_main.c | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/include/text_options_strings.h.in b/include/text_options_strings.h.in index 03e1f753..7b68f0c4 100644 --- a/include/text_options_strings.h.in +++ b/include/text_options_strings.h.in @@ -107,7 +107,9 @@ #define TEXT_OPT_NEAREST _("Nearest") #define TEXT_OPT_LINEAR _("Linear") #define TEXT_OPT_MVOLUME _("Master Volume") -#define TEXT_OPT_TMUSIC _("Music Volume") +#define TEXT_OPT_MUSIC_VOLUME _("Music Volume") +#define TEXT_OPT_SFX_VOLUME _("Sfx Volume") +#define TEXT_OPT_ENV_VOLUME _("Env Volume") #define TEXT_OPT_VSYNC _("Vertical Sync") #define TEXT_OPT_DOUBLE _("Double") #define TEXT_RESET_WINDOW _("Reset Window") diff --git a/src/audio/external.c b/src/audio/external.c index 9f28ec32..b0ebbb99 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -2062,8 +2062,8 @@ void play_dialog_sound(u8 dialogID) { #endif } -void setBackgroundMusicVolume(s32 volume){ - func_8031D838(SEQ_PLAYER_LEVEL, 0, volume); +void setSequencePlayerVolume(s32 player, s32 volume){ + func_8031D838(player, 0, volume); } void play_music(u8 player, u16 seqArgs, u16 fadeTimer) { diff --git a/src/audio/external.h b/src/audio/external.h index ef902a51..4d763f35 100644 --- a/src/audio/external.h +++ b/src/audio/external.h @@ -37,7 +37,7 @@ void sound_banks_disable(u8 player, u16 bankMask); void sound_banks_enable(u8 player, u16 bankMask); void func_80320A4C(u8 bankIndex, u8 arg1); void play_dialog_sound(u8 dialogID); -void setBackgroundMusicVolume(s32 volume); +void setSequencePlayerVolume(s32 player, s32 volume); void play_music(u8 player, u16 seqArgs, u16 fadeTimer); void stop_background_music(u16 seqId); void fadeout_background_music(u16 arg0, u16 fadeOut); diff --git a/src/game/options_menu.c b/src/game/options_menu.c index 660a6d4f..3c084c49 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -85,8 +85,10 @@ static const u8 optsVideoStr[][32] = { }; static const u8 optsAudioStr[][32] = { - { TEXT_OPT_MVOLUME }, - { TEXT_OPT_TMUSIC }, + { TEXT_OPT_MVOLUME }, + { TEXT_OPT_MUSIC_VOLUME }, + { TEXT_OPT_SFX_VOLUME }, + { TEXT_OPT_ENV_VOLUME }, }; static const u8 optsCheatsStr[][64] = { @@ -261,6 +263,8 @@ static struct Option optsVideo[] = { static struct Option optsAudio[] = { DEF_OPT_SCROLL( optsAudioStr[0], &configMasterVolume, 0, MAX_VOLUME, 1 ), DEF_OPT_SCROLL( optsAudioStr[1], &configMusicVolume, 0, MAX_VOLUME, 1), + DEF_OPT_SCROLL( optsAudioStr[2], &configSfxVolume, 0, MAX_VOLUME, 1), + DEF_OPT_SCROLL( optsAudioStr[3], &configEnvVolume, 0, MAX_VOLUME, 1), }; static struct Option optsCheats[] = { diff --git a/src/pc/configfile.c b/src/pc/configfile.c index 6a6b6bd4..2a85b7a6 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -52,6 +52,8 @@ ConfigWindow configWindow = { unsigned int configFiltering = 1; // 0=force nearest, 1=linear, (TODO) 2=three-point unsigned int configMasterVolume = MAX_VOLUME; // 0 - MAX_VOLUME unsigned int configMusicVolume = MAX_VOLUME; +unsigned int configSfxVolume = MAX_VOLUME; +unsigned int configEnvVolume = MAX_VOLUME; // Keyboard mappings (VK_ values, by default keyboard/gamepad/mouse) unsigned int configKeyA[MAX_BINDS] = { 0x0026, 0x1000, 0x1103 }; @@ -101,6 +103,8 @@ static const struct ConfigOption options[] = { {.name = "texture_filtering", .type = CONFIG_TYPE_UINT, .uintValue = &configFiltering}, {.name = "master_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMasterVolume}, {.name = "music_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configMusicVolume}, + {.name = "sfx_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configSfxVolume}, + {.name = "env_volume", .type = CONFIG_TYPE_UINT, .uintValue = &configEnvVolume}, {.name = "key_a", .type = CONFIG_TYPE_BIND, .uintValue = configKeyA}, {.name = "key_b", .type = CONFIG_TYPE_BIND, .uintValue = configKeyB}, {.name = "key_start", .type = CONFIG_TYPE_BIND, .uintValue = configKeyStart}, diff --git a/src/pc/configfile.h b/src/pc/configfile.h index 0c2960f8..45025141 100644 --- a/src/pc/configfile.h +++ b/src/pc/configfile.h @@ -22,6 +22,8 @@ extern ConfigWindow configWindow; extern unsigned int configFiltering; extern unsigned int configMasterVolume; extern unsigned int configMusicVolume; +extern unsigned int configSfxVolume; +extern unsigned int configEnvVolume; extern unsigned int configKeyA[]; extern unsigned int configKeyB[]; extern unsigned int configKeyStart[]; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 8843930f..05bb4aaf 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -74,7 +74,9 @@ void produce_one_frame(void) { gfx_start_frame(); - setBackgroundMusicVolume((s32)configMusicVolume); + setSequencePlayerVolume(SEQ_PLAYER_LEVEL, (s32)configMusicVolume); + setSequencePlayerVolume(SEQ_PLAYER_SFX, (s32)configSfxVolume); + setSequencePlayerVolume(SEQ_PLAYER_ENV, (s32)configEnvVolume); game_loop_one_iteration(); thread6_rumble_loop(NULL);