音楽再生 - Siv3D/Reference-JP GitHub Wiki

2 つの音楽をフェードイン/アウトさせて交互に再生

# include <Siv3D.hpp>

void Main()
{
    Sound sound1 = Dialog::OpenSound();
    Sound sound2 = Dialog::OpenSound();
    sound1.play();

    while (System::Update())
    {
        if (Input::MouseL.clicked)
        {
            sound1.pause(4s);
            sound2.play(4s);
            std::swap(sound1, sound2);
        }
    }
}
⚠️ **GitHub.com Fallback** ⚠️