MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / ReadSound

Function ReadSound

src/openrct2/config/Config.cpp:440–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438 }
439
440 static void ReadSound(IIniReader* reader)
441 {
442 if (reader->ReadSection("sound"))
443 {
444 auto model = &_config.sound;
445 model->device = reader->GetString("audio_device", "");
446 model->masterSoundEnabled = reader->GetBoolean("master_sound", true);
447 model->masterVolume = reader->GetInt32("master_volume", 100);
448 model->titleMusic = static_cast<TitleMusicKind>(
449 reader->GetInt32("title_theme", EnumValue(TitleMusicKind::OpenRCT2)));
450 model->soundEnabled = reader->GetBoolean("sound", true);
451 model->soundVolume = reader->GetInt32("sound_volume", 100);
452 model->rideMusicEnabled = reader->GetBoolean("ride_music", true);
453 model->rideMusicVolume = reader->GetInt32("ride_music_volume", 100);
454 model->audioFocus = reader->GetBoolean("audio_focus", false);
455 }
456 }
457
458 static void WriteSound(IIniWriter* writer)
459 {

Callers 2

SetDefaultsFunction · 0.85
ReadFileFunction · 0.85

Calls 5

EnumValueFunction · 0.85
ReadSectionMethod · 0.45
GetStringMethod · 0.45
GetBooleanMethod · 0.45
GetInt32Method · 0.45

Tested by

no test coverage detected