1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Add new audio objects for loading sounds

This commit is contained in:
Ted John
2022-05-09 18:34:38 +01:00
parent 697fa7c436
commit a2e6691ac2
46 changed files with 1583 additions and 1152 deletions

View File

@@ -1259,8 +1259,7 @@ void peep_update_crowd_noise()
// Mute crowd noise
if (_crowdSoundChannel != nullptr)
{
Mixer_Stop_Channel(_crowdSoundChannel);
_crowdSoundChannel = nullptr;
Mixer_Channel_Volume(_crowdSoundChannel, 0);
}
}
else
@@ -1276,7 +1275,8 @@ void peep_update_crowd_noise()
// Load and play crowd noise if needed and set volume
if (_crowdSoundChannel == nullptr)
{
_crowdSoundChannel = Mixer_Play_Music(PATH_ID_CSS2, MIXER_LOOP_INFINITE, false);
_crowdSoundChannel = Mixer_Play_Effect(
OpenRCT2::Audio::SoundId::CrowdAmbience, MIXER_LOOP_INFINITE, 0, 0.5f, 1, false);
if (_crowdSoundChannel != nullptr)
{
Mixer_Channel_SetGroup(_crowdSoundChannel, OpenRCT2::Audio::MixerGroup::Sound);