namespace
#include <bn_jingle.h>
jingle Direct Sound jingles related functions.
Jingles are limited to 4 channels only and can't be paused or stopped.
Functions
- auto playing() -> bool
- Indicates if currently there's any Direct Sound jingle playing or not.
-
auto playing_item() -> optional<music_
item> - Returns the active music_
item if there's any Direct Sound jingle playing; bn:: nullopt otherwise. -
void play(music_
item item) - Plays the Direct Sound jingle specified by the given music_
item with volume = 1. -
void play(music_
item item, fixed volume) - Plays the Direct Sound jingle specified by the given music_
item. - auto volume() -> fixed
- Returns the volume of the active Direct Sound jingle.
- void set_volume(fixed volume)
- Sets the volume of the active Direct Sound jingle.
Function documentation
void bn:: jingle:: play(music_ item item)
Plays the Direct Sound jingle specified by the given music_
Remember that jingles are limited to 4 channels only and can't be paused or stopped.
void bn:: jingle:: play(music_ item item,
fixed volume)
Plays the Direct Sound jingle specified by the given music_
Parameters | |
---|---|
item | Specifies the jingle to play. |
volume | Volume level, in the range [0..1]. |
Remember that jingles are limited to 4 channels only and can't be paused or stopped.
void bn:: jingle:: set_volume(fixed volume)
Sets the volume of the active Direct Sound jingle.
Parameters | |
---|---|
volume | Volume level, in the range [0..1]. |