namespace
#include <bn_dmg_music.h>
dmg_music DMG music related functions.
Functions
- auto playing() -> bool
- Indicates if currently there's any DMG music playing or not.
-
auto playing_item() -> optional<dmg_
music_ item> - Returns the active dmg_
music_ item if there's any DMG music playing; bn:: nullopt otherwise. -
void play(const dmg_
music_ item& item) - Plays the DMG music specified by the given dmg_
music_ item with default settings. -
void play(const dmg_
music_ item& item, int speed) - Plays the DMG music specified by the given dmg_
music_ item. -
void play(const dmg_
music_ item& item, int speed, bool loop) - Plays the DMG music specified by the given dmg_
music_ item. - void stop()
- Stops playback of the active DMG music.
- auto paused() -> bool
- Indicates if the active DMG music has been paused or not.
- void pause()
- Pauses playback of the active DMG music.
- void resume()
- Resumes playback of the paused DMG music.
-
auto position() -> const dmg_
music_ position& - Returns the sequence position of the active DMG music.
- void set_position(int pattern, int row)
- Sets the sequence position of the active DMG music.
-
void set_position(const dmg_
music_ position& position) - Sets the sequence position of the active DMG music.
- auto left_volume() -> fixed
- Returns the volume of the active DMG music for the left speaker.
- auto right_volume() -> fixed
- Returns the volume of the active DMG music for the right speaker.
- void set_left_volume(fixed left_volume)
- Sets the volume of the active DMG music for the left speaker.
- void set_right_volume(fixed right_volume)
- Sets the volume of the active DMG music for the right speaker.
- void set_volume(fixed volume)
- Sets the volume of the active DMG music for both speakers.
- void set_volume(fixed left_volume, fixed right_volume)
- Sets the volume of the active DMG music for both speakers.
-
auto master_volume() -> dmg_
music_ master_ volume - Returns the master volume of all DMG music.
-
void set_master_volume(dmg_
music_ master_ volume volume) - Sets the master volume of all DMG music.
Function documentation
void bn:: dmg_music:: play(const dmg_ music_ item& item)
Plays the DMG music specified by the given dmg_
Default settings are speed = 1 and loop enabled.
void bn:: dmg_music:: play(const dmg_ music_ item& item,
int speed)
Plays the DMG music specified by the given dmg_
Parameters | |
---|---|
item | Specifies the DMG music to play. |
speed | Playback speed, in the range [1..256]. |
VGM player only supports the default playback speed (1).
void bn:: dmg_music:: play(const dmg_ music_ item& item,
int speed,
bool loop)
Plays the DMG music specified by the given dmg_
Parameters | |
---|---|
item | Specifies the DMG music to play. |
speed | Playback speed, in the range [1..256]. |
loop | Indicates if it must be played until it is stopped manually or until end. |
VGM player only supports the default playback speed (1).
void bn:: dmg_music:: set_position(int pattern,
int row)
Sets the sequence position of the active DMG music.
Parameters | |
---|---|
pattern | Pattern order. |
row | Row inside the pattern. |
void bn:: dmg_music:: set_left_volume(fixed left_volume)
Sets the volume of the active DMG music for the left speaker.
Parameters | |
---|---|
left_volume | Left speaker volume level, in the range [0..1]. |
Volume change is not supported by the VGM player.
void bn:: dmg_music:: set_right_volume(fixed right_volume)
Sets the volume of the active DMG music for the right speaker.
Parameters | |
---|---|
right_volume | Right speaker volume level, in the range [0..1]. |
Volume change is not supported by the VGM player.
void bn:: dmg_music:: set_volume(fixed volume)
Sets the volume of the active DMG music for both speakers.
Parameters | |
---|---|
volume | Volume level, in the range [0..1]. |
Volume change is not supported by the VGM player.
void bn:: dmg_music:: set_volume(fixed left_volume,
fixed right_volume)
Sets the volume of the active DMG music for both speakers.
Parameters | |
---|---|
left_volume | Left speaker volume level, in the range [0..1]. |
right_volume | Right speaker volume level, in the range [0..1]. |
Volume change is not supported by the VGM player.