Audiokinetic Wwise Knowledge Base

Can I control the volume of a bus in code? (for example to set the volume of Music, Speech, etc)

The Wwise API doesn`t allow you to control the volume (or other properties) of busses, containers, sounds, etc. directly. Instead, you can use the RTPC system to control those properties in the code.

The dev and the sound designer just need to agree on the name and range of the Game Parameters (for example "Music_Volume", "Voices_Volume", "Main_Volume", etc), and then the sound designer can add Volume curves to busses based on those Game Parameters, and tweak the curves as they see fit (even in real-time while Wwise is connected to the game, so you can tweak the volume controls in the game without having to modify the code, recompile, etc).

Note: Volume is "additive" in the hierarchy. This means that if a parent bus has RTPC on the volume, and one of its children also has RTPC on the volume, both RTPC curves will contribute to lowering the volume of sounds playing through the child bus. For example you could have RTPC on the volume of the Master bus for the main volume control, and RTPC on sub busses for music, voices, ambient sounds, etc.

Note: RTPCs on busses are not dependant on one particular game object. When setting RTPC values that are destined to busses, be sure to use AK_INVALID_GAME_OBJECT as the game object ID. Game object-specific RTPC values are ignored by busses.




Article Details

Last Updated
4th o April, 2008

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF

User Opinions (0 votes)

No users have voted.

How would you rate this answer?



Thank you for rating this answer.

Continue