버전

menu_open

Handling User Music (BGM) and DVR

On many consoles it is possible to replace the game music with the user's own music from his personal library. This feature is almost automatic in Wwise. However, there are some differences in implementation and behavior for some platforms.

On all platforms, the initial setup is the same: the sound designer must tag the busses that will be muted when the user starts his music. This is done with the "Mute for Background Music" check box. On the code side, some additional details are needed depending on the platform.

BGM details for Android

Make sure to fill the jNativeActivity member of the AkPlatformInitSettings. The Mute/Unmute action will occur only when the user switches from the music player app to the game. This means that there is no "Unmute" if the user music finishes by itself.

BGM details for iOS

If the AudioSession flag "MixOther" is set in the sound engine initialization settings, the Mute/Unmute action will occur only when the user switches from the music player app to the game. This means that there is no "Unmute" if the user music finishes by itself. On iOS8 and later, if the AVAudioSessionCategoryAmbient category is used, muting and unmuting of the game music will occur for all application audio interruptions.

Background Music on the DVR-enabled platforms (XBox One and PS4).

Some platforms have a DVR function that allows the gamer to record his gameplay and publish it. This raises a few legal issues regarding the copyrighted music that might be part of the game audio, or user-replaceable music. While the game studio have the rights to use the music in their game, the end-user doesn't have the rights to distribute it in any form. Thus the platform requirements usually state that user background music should not be recorded.

The cost-effective solution (CPU-wise) for this problem is to mix the music separately from the rest of the game. This is done using the Secondary Output feature.

Setting up Background Music in the Authoring tool

In the authoring tool, you will need to route your music objects to a separate master Audio Bus than the default or primary one. In most projects, this means creating a brand new master Audio Bus (right click on the Master Mixer Hierarchy's Work Unit and select Add > Child). By default, all busses are routed to the System output. Change the Audio Device ShareSet to point to the DVR output.

Don't forget that not all platforms support a DVR. You will need to Unlink the Audio Device property to point to the System output for those platforms. Alternatively, unlink the Output Bus property of the music objects.

Setting up the DVR Output in the Game Code

The DVR output must be added manually, if used in the game. This is done with AK::SoundEngine::AddOutput(), passing the Audio Device ShareSet name (or ID) along with other parameters in AkOutputSettings.

Note.gif
Note: Important Note for PS4 You must add the secondary output with AK::SoundEngine::AddOutput() if you want to use the Mute for Background Music feature. If this output isn't used, the PS4 system doesn't notify that the user music starts.

For an example, refer to <Wwise installation path>/SDK/samples/IntegrationDemo/DemoPages/DemoBGM.cpp.


이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요