bn::jingle namespace
#include <bn_jingle.h>

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.
void stop()
Stops playback of the active Direct Sound jingle.
auto paused() -> bool
Indicates if the active Direct Sound jingle has been paused or not.
void pause()
Pauses playback of the active Direct Sound jingle.
void resume()
Resumes playback of the paused Direct Sound jingle.
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_item with volume = 1.

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_item.

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].