libmsx
C library for MSX
|
A PSG sound driver. More...
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | sound_fragment |
The sound fragment structure. More... | |
struct | sound_clip |
The sound clip structure. More... | |
Macros | |
#define | SOUND_H |
#define | SOUND_CHANNEL_A (1 << 0) |
The bit-mask to specify PSG channel A. | |
#define | SOUND_CHANNEL_B (1 << 1) |
The bit-mask to specify PSG channel B. | |
#define | SOUND_CHANNEL_C (1 << 2) |
The bit-mask to specify PSG channel C. | |
#define | SOUND_CHANNEL_ALL (SOUND_CHANNEL_A | SOUND_CHANNEL_B | SOUND_CHANNEL_C) |
The bit-mask to specify all PSG channels. | |
#define | SOUND_SPEED_1X (4) |
The value of the playback speed multiplier for 1.0x speed. | |
#define | SOUND_SPEED_MIN (1) |
Minimum value of playback speed multiplier. | |
#define | SOUND_SPEED_MAX (8) |
Maximum value of playback speed multiplier. | |
Functions | |
void | sound_init (void) |
MSX This function initializes the PSG and the sound driver. | |
void | sound_set_speed (uint8_t multiplier) |
MSX Sets the playback speed multiplier for background music. | |
void | sound_set_volume (uint8_t volume) |
MSX Set main volume level. | |
void | sound_set_repeat (bool repeat) |
MSX Turn on/off the auto-repeat of the BGM. | |
void | sound_set_mute (uint8_t mute) |
MSX Mute/unmute for each sound channel. | |
void | sound_effect (const struct sound_clip *s) |
MSX Plays the specified music clip as sound effect. | |
void | sound_set_bgm (const struct sound_clip *s) |
MSX Sets the specified music clip as BGM in the sound driver. | |
void | sound_start (void) |
MSX Start the BGM. | |
void | sound_stop (void) |
MSX Stop the BGM. | |
void | sound_pause (void) |
MSX Pause the BGM. | |
void | sound_player (void) |
MSX Main routine of the sound driver. | |