Version

menu_open

Background Music Mixing with DVR Example

The recording of copyrighted music is usually not permitted through the DVR feature of the PS4, PS5, Xbox One, and Xbox Series X. These platforms provide a special virtual device to manage the music alone and avoid recording it. In Wwise, this also means separately mixing the music, in a different hierarchy. We implemented this in the Integration Demo project. You can take look at the setup for the NonRecordable_Bus, the RecordableMusic and NonRecordableMusic sounds. From the code perspective, take a look at DemoBGM.cpp.

The NonRecordableMusic is routed to the Non Recordable Bus which outputs its signal to the DVR_Bypass output, as shown below:

Figure 5. Sound routed to NonRecordable_Bus

Sound routed to NonRecordable_Bus

Figure 6. Bus Audio Device set to DVR_Bypass

Bus Audio Device set to DVR_Bypass

On the code side, there is very little to do to have this working. The game must call AK::SoundEngine::AddOutput() with the name of the Audio Device ShareSet to initialize the output.

With the Wwise Advanced Profiler, we can see that each sound goes in separate busses and separate outputs. This is what normally happens on the supported platforms. (Note that the intermediate bus Music is omitted.)

Figure 7. Two master busses mixing in separate outputs

Two master busses mixing in separate outputs

Managing missing hardware outputs

The DVR feature doesn’t exist on any other supported platforms, so we need to do something different. In this case you obviously don’t want to lose that music in-game, so you have to route it correctly. To resolve this you can simply unlink the Audio Device property. In the master bus Property Editor, the Audio Device property can also be unlinked. In the example below, we made the Non Recordable Bus output to the ordinary System output. It still goes to DVR_Bypass for the supported platforms though, hence the half-orange Link icon. This is what we did in the Integration Demo project. In this case, the code doesn’t need to call AK::SoundEngine::AddOutput to initialize the output since the System output is always initialized at startup.

Figure 8. Audio Device set to System output

Audio Device set to System output

When playing both sounds, we see that the signal from both sources goes through separate busses, but they end up mixed in the same System output.

Figure 9. Two master busses mixing in device

Two master busses mixing in device


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise