mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Allow ride music to loop seamlessly without reload
This commit is contained in:
@@ -226,7 +226,8 @@ namespace OpenRCT2::RideAudio
|
||||
auto source = audioContext->CreateStreamFromWAV(std::move(stream));
|
||||
if (source != nullptr)
|
||||
{
|
||||
auto channel = Mixer_Play_Music(source, MIXER_LOOP_NONE, true);
|
||||
auto shouldLoop = musicObj->GetTrackCount() == 1;
|
||||
auto channel = Mixer_Play_Music(source, shouldLoop ? MIXER_LOOP_INFINITE : MIXER_LOOP_NONE, true);
|
||||
if (channel != nullptr)
|
||||
{
|
||||
_musicChannels.emplace_back(instance, channel, source);
|
||||
|
||||
Reference in New Issue
Block a user