libmsx
C library for MSX
Loading...
Searching...
No Matches

SNDDRV a PSG sound driver. More...

#include <audio.h>
#include <audio_dec.h>
#include "./snd_sound.h"
#include <stdint.h>
+ Include dependency graph for snddrv.h:

Go to the source code of this file.

Macros

#define SND_SPEED_1X   (16)
 The value of the playback speed multiplier for 1.0x speed.
 

Functions

uint8_t snd_get_bgm_frequency (void)
 MSX Returns default frequency of the background music.
 
uint8_t snd_get_player_frequency (void)
 MSX Returns current player frequency of the background music.
 
void snd_set_player_frequency (uint8_t freq)
 MSX Force player frequency of the background music.
 
void snd_set_speed (uint8_t multiplier)
 MSX Sets the playback speed multiplier for background music.
 
void snd_set_repeat (bool repeat)
 MSX Turn on/off the auto-repeat of the BGM.
 
void snd_set_bgm (uint8_t index, const snd_SoundAssets *sa)
 MSX Sets the specified music as BGM in the sound driver.
 
void snd_set_sfx (uint8_t index, const snd_SoundAssets *sa)
 MSX Sets the specified music as SFX (sound effects) in the sound driver.
 
void snd_set_sfx_with_priority (uint8_t index, const snd_SoundAssets *sa, uint8_t priority)
 MSX Sets the specified music as SFX (sound effects) in the sound driver.
 
bool snd_is_playing (void)
 MSX Return whether BGM and/or SFX is playing or not.
 
bool snd_is_playing_bgm (void)
 MSX Return whether BGM is playing or not.
 
bool snd_is_playing_sfx (void)
 MSX Return whether SFX is playing or not.
 
void snd_init (void)
 MSX Initialize the PSG and the sound driver.
 
void snd_start (void)
 MSX Start / Resume music.
 
void snd_pause (void)
 MSX Pause music.
 
bool snd_is_paused (void)
 MSX Return whether paused or not.
 
void snd_stop (void)
 MSX Stop music.
 
void snd_play (void)
 MSX Main routine of the sound driver.
 

Variables

const AudioDecoder SND_BGM_DECODER
 
const AudioDecoder SND_SFX_DECODER
 

Detailed Description

SNDDRV a PSG sound driver.

Definition in file snddrv.h.