libmsx
C library for MSX
Loading...
Searching...
No Matches
Callback functions of the libmsx audio replayer.

#include <audio_cb.h> More...

+ Collaboration diagram for Callback functions of the libmsx audio replayer.:

Functions

void audio_cb_bgm_changed (uint8_t song_rate, const AudioDecoder *decoder)
 MSX Callback function called by the music loader or decoder when setting or changing the BGM.
 
void audio_cb_sfx_changed (uint8_t song_rate, const AudioDecoder *decoder)
 MSX Callback function called by the music loader or decoder when setting or changing the SFX.
 
void audio_cb_scc_mode (uint8_t mode)
 MSX Set the replayer to use SCC compatible mode or SCC+ mode.
 

Detailed Description

#include <audio_cb.h>

Callback functions of the libmsx audio replayer.

Either music loader or decoder implementation shall use these functions.

See also
The audio decoder interface for the libmsx audio replayer.

Function Documentation

◆ audio_cb_bgm_changed()

void audio_cb_bgm_changed ( uint8_t  song_rate,
const AudioDecoder decoder 
)

MSX Callback function called by the music loader or decoder when setting or changing the BGM.

Notify the replayer that BGM is changed or set to the decoder, and its default frequency.

Implementations of either the music loader or decoder should call this function when the background music is changed or set to the decoder.

Parameters
song_rateDefault frequency of the song. (may be 0 if unknown)
decoderPointer to an AudioDecoder object.
Postcondition
interrupts is disabled.

◆ audio_cb_sfx_changed()

void audio_cb_sfx_changed ( uint8_t  song_rate,
const AudioDecoder decoder 
)

MSX Callback function called by the music loader or decoder when setting or changing the SFX.

Notify the replayer that SFX is changed or set to the decoder, and its default frequency.

Implementations of either the music loader or decoder should call this function when the sound effects is changed or set to the decoder.

Parameters
song_rateDefault frequency of the song. (may be 0 if unknown)
decoderPointer to an AudioDecoder object.
Postcondition
interrupts is disabled.

◆ audio_cb_scc_mode()

void audio_cb_scc_mode ( uint8_t  mode)

MSX Set the replayer to use SCC compatible mode or SCC+ mode.

Parameters
mode1 for SCC mode, 2 for SCC+ mode, others are ignored.
Postcondition
interrupts is enabled.