forked from rosebudai/OpenRCT2-Web
Allow ride music to loop seamlessly without reload
This commit is contained in:
1 parent
704e68a9b4
commit
dda5402644
1 file changed
+2
-1
@@ -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