There may be alternative options that work using one instance of OBS, depending on your particular use-case. My understanding is that you need your game and music to output to the same audio device so you can hear both.
If they are both local recordings (eg. to your hard drive), you could consider recording without the music, listening to music on a separate device/phone/laptop, and overlaying music in a video editor.
For anything else, like:
- if you want to listen to music while recording anyways, without using a separate laptop/phone/device for music
- if it is actually one live broadcast and one recording
a combination of Virtual Audio Cable (or similar software) and CheVolume (or similar software, like Audio Router) should work.
Use an audio routing software to force your game to output to virtual audio line 1. All major music players should be able to select an output device, so select virtual audio line 2. If your music player of choice does not allow that option, use the routing software to force your music to output to virtual audio line 2. Mix virtual audio line 1 and 2 and output to line 3.
Set line 3 as your default audio device, so you hear gameplay and music. Live broadcast with gameplay and music by setting Desktop Audio Device in OBS to default or virtual line 3. Record a local copy without music by setting Desktop Audio Device 2 to virtual line 1. Assign Desktop Audio Device to only play on OBS audio track 1, and only broadcast OBS audio track 1. Assign Desktop Audio Device 2 to only play on OBS audio track 2, and locally record OBS audio track 2.
Alternatively, if you're like me and already use Desktop Audio Device for your computer's Default Device, and Desktop Audio Device 2 for your computer's Default Communication Device, you can manually add audio output sources in your scene, then configure which OBS audio tracks they output to.
The idea of combining virtual audio devices with audio routing software is something I've been considering for my usage, but I have yet to implement or test it. I cannot guarantee this works exactly as I described, and even if it does, it may require a powerful CPU or high amounts of RAM. You could probably forgo the virtual audio device if you have your own external audio mixer, but as I don't own one of those, I can't give any assurance about that, either.