bn::audio namespace
#include <bn_audio.h>

Audio related functions.

Functions

auto available_mixing_rates() -> span<const audio_mixing_rate>
Returns the available Direct Sound mixing rates.
auto mixing_rate() -> audio_mixing_rate
Returns the current Direct Sound mixing rate.
void set_mixing_rate(audio_mixing_rate mixing_rate)
Specifies the current Direct Sound mixing rate.
auto update_on_vblank() -> bool
Indicates if audio is updated on the V-Blank interrupt or not.
void set_update_on_vblank(bool update_on_vblank)
Sets if audio must be updated on the V-Blank interrupt or not.
auto event_handler_enabled() -> bool
Indicates if audio events are registered or not.
void set_event_handler_enabled(bool enabled)
Sets if audio events must be registered or not.
auto event_ids() -> span<uint8_t>
Returns the ID of the audio events registered since the last core::update call.

Function documentation

void bn::audio::set_mixing_rate(audio_mixing_rate mixing_rate)

Specifies the current Direct Sound mixing rate.

All Direct Sound audio playback must be stopped before changing the mixing rate.

bool bn::audio::update_on_vblank()

Indicates if audio is updated on the V-Blank interrupt or not.

Updating audio on the V-Blank interrupt helps to reduce audio noise but increases the possibility of visual bugs because of lack of V-Blank time.

void bn::audio::set_update_on_vblank(bool update_on_vblank)

Sets if audio must be updated on the V-Blank interrupt or not.

Updating audio on the V-Blank interrupt helps to reduce audio noise but increases the possibility of visual bugs because of lack of V-Blank time.

bool bn::audio::event_handler_enabled()

Indicates if audio events are registered or not.

See https://blocksds.skylyrac.net/docs/maxmod/md_documentation_2using__song__events.html for more information about audio events.

void bn::audio::set_event_handler_enabled(bool enabled)

Sets if audio events must be registered or not.

See https://blocksds.skylyrac.net/docs/maxmod/md_documentation_2using__song__events.html for more information about audio events.

span<uint8_t> bn::audio::event_ids()

Returns the ID of the audio events registered since the last core::update call.

To register audio events, the event handler must be enabled with audio::set_event_handler_enabled.

See https://blocksds.skylyrac.net/docs/maxmod/md_documentation_2using__song__events.html for more information about audio events.