diff --git a/src/audio/audio.c b/src/audio/audio.c index d50c1b4ab1..d46df9f61e 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -1764,10 +1764,10 @@ void audio_init2(int device) ride_music->rideid = -1; } } + + // Used by original code for directsound if (!(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) & 1 << 4)) { - gConfigSound.forced_software_buffering = RCT2_GLOBAL(0x001425B74, uint32) != RCT2_GLOBAL(0x001425B78, uint32) || RCT2_GLOBAL(0x001425B74, uint32) != RCT2_GLOBAL(0x001425B7C, uint32); RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) |= 1 << 4; - config_save_default(); } // When all sound code is reversed this can be removed. @@ -1881,4 +1881,4 @@ void stop_vehicle_sounds() vehicle_sound->id = 0xFFFF; } } -} \ No newline at end of file +} diff --git a/src/config.c b/src/config.c index 3b67f62c26..9849a759d6 100644 --- a/src/config.c +++ b/src/config.c @@ -186,8 +186,6 @@ config_property_definition _interfaceDefinitions[] = { }; config_property_definition _soundDefinitions[] = { - { offsetof(sound_configuration, forced_software_buffering), "forced_software_buffering", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, - { offsetof(sound_configuration, sound_quality), "sound_quality", CONFIG_VALUE_TYPE_UINT8, 2, NULL }, { offsetof(sound_configuration, title_music), "title_music", CONFIG_VALUE_TYPE_UINT8, 2, NULL }, { offsetof(sound_configuration, sound), "sound", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, { offsetof(sound_configuration, ride_music), "ride_music", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL }, @@ -749,8 +747,9 @@ void config_apply_to_old_addresses() RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_METRIC, sint8) = gConfigGeneral.measurement_format; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_TEMPERATURE, sint8) = gConfigGeneral.temperature_format; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8) = gConfigGeneral.construction_marker_colour; - RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = gConfigSound.sound_quality; - RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_SW_BUFFER, sint8) = gConfigSound.forced_software_buffering; + // Force best sound quality and software buffering, for original code. + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = 2; + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_SW_BUFFER, sint8) = 1; RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = (gConfigGeneral.measurement_format + 1) * 256; if (gConfigGeneral.show_height_as_units) RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, sint16) = 0; @@ -830,9 +829,9 @@ void config_dat_load() RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) &= !CONFIG_FLAG_SAVE_PLUGIN_DATA; } - //sound configuration - RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = gConfigSound.sound_quality; - RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_SW_BUFFER, sint8) = gConfigSound.forced_software_buffering; + //sound configuration: force software buffering and best quality + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = 2; + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_SW_BUFFER, sint8) = 1; // Line below is temporaraly disabled until all config is in the new format. //if (RCT2_GLOBAL(0x009AB4C6, sint8) == 1) @@ -1389,4 +1388,4 @@ static theme_property_definition *themes_get_property_def(theme_section_definiti return NULL; } -#pragma endregion \ No newline at end of file +#pragma endregion diff --git a/src/config.h b/src/config.h index ce98146be4..cb75fbbdc5 100644 --- a/src/config.h +++ b/src/config.h @@ -89,13 +89,6 @@ enum { MEASUREMENT_FORMAT_METRIC }; -enum{ - SOUND_QUALITY_LOW, - SOUND_QUALITY_MEDIUM, - SOUND_QUALITY_HIGH - -}; - enum { AUTOSAVE_EVERY_WEEK, AUTOSAVE_EVERY_2_WEEKS, @@ -151,8 +144,6 @@ typedef struct { } interface_configuration; typedef struct { - sint8 forced_software_buffering; - sint8 sound_quality; uint8 title_music; uint8 sound; uint8 ride_music; diff --git a/src/windows/options.c b/src/windows/options.c index 676ea86fa2..20e790f22b 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -1047,9 +1047,6 @@ static void window_options_invalidate() // music: on/off RCT2_GLOBAL(0x013CE952 + 8, uint16) = STR_OFF + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MUSIC, uint8); - // sound quality: low/medium/high - RCT2_GLOBAL(0x013CE952 + 10, uint16) = STR_SOUND_LOW + gConfigSound.sound_quality; - widget_set_checkbox_value(w, WIDX_SOUND_CHECKBOX, gConfigSound.sound); widget_set_checkbox_value(w, WIDX_MUSIC_CHECKBOX, RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_MUSIC, uint8));