bn::dmg_music_volume_loop_action class

Modifies the volume of the active DMG music from a minimum to a maximum. When the volume is equal to the given final state, it goes back to its initial state and vice versa.

Volume change is not supported by the VGM player.

Base classes

template<typename Property, class PropertyManager>
class loop_template_action<fixed_point, dmg_music_volume_manager>
Modifies the property by delta from a minimum to a maximum. When the property is equal to the given final state, it goes back to its initial state and vice versa.

Constructors, destructors, conversion operators

dmg_music_volume_loop_action(int duration_updates, fixed final_volume)
Constructor.
dmg_music_volume_loop_action(int duration_updates, fixed final_left_volume, fixed final_right_volume)
Constructor.

Public functions

auto final_left_volume() const -> fixed
When the volume for the left speaker is equal to the returned parameter, it goes back to its initial state and vice versa.
auto final_right_volume() const -> fixed
When the volume for the right speaker is equal to the returned parameter, it goes back to its initial state and vice versa.

Function documentation

bn::dmg_music_volume_loop_action::dmg_music_volume_loop_action(int duration_updates, fixed final_volume)

Constructor.

Parameters
duration_updates How much times the action has to be updated before changing the direction of the volume delta.
final_volume When the volume for both speakers is equal to this parameter, it goes back to its initial state and vice versa.

This volume must be in the range [0..1].

bn::dmg_music_volume_loop_action::dmg_music_volume_loop_action(int duration_updates, fixed final_left_volume, fixed final_right_volume)

Constructor.

Parameters
duration_updates How much times the action has to be updated before changing the direction of the volume delta.
final_left_volume When the volume for the left speaker is equal to this parameter, it goes back to its initial state and vice versa.
final_right_volume When the volume for the right speaker is equal to this parameter, it goes back to its initial state and vice versa.

This volume must be in the range [0..1]. This volume must be in the range [0..1].