libmsx
C library for MSX
Loading...
Searching...
No Matches
la0.h
Go to the documentation of this file.
1// -*- coding: utf-8-unix -*-
2/*
3 * Copyright (c) 2021-2024 Daishi Mori (mori0091)
4 *
5 * This software is released under the MIT License.\n
6 * See https://github.com/mori0091/libmsx/blob/main/LICENSE
7 *
8 * GitHub libmsx project\n
9 * https://github.com/mori0091/libmsx
10 */
17#ifndef LA0_H_
18#define LA0_H_
19
20#include <audio.h>
21#include <audio_dec.h>
22#include <memfile.h>
23
24#include <stdbool.h>
25#include <stdint.h>
26#include <stddef.h>
27
74extern const AudioDecoder LA0_BGM_DECODER;
75
79extern const AudioDecoder LA0_SFX_DECODER;
80
95int la0_open_mem(MemFile * mf, const uint8_t * loc, size_t size);
96
105int la0_open_bmem(MemFile * mf, bmemptr_t loc, uint32_t size);
106
114int la0_open_resource(MemFile * mf, const char * path);
115
131void la0_set_bgm(uint8_t idx, MemFile * mf);
132
140void la0_set_sfx(uint8_t idx, MemFile * mf);
141
154void la0_set_sfx_with_priority(uint8_t idx, MemFile * mf, uint8_t priority);
155
172
185
198
209
214#endif // LA0_H_
The libmsx audio replayer.
The audio decoder interface for the libmsx audio replayer.
uint32_t bmemptr_t
Type of an address of banked memory.
Definition bmem.h:74
const AudioDecoder LA0_SFX_DECODER
LA0 SFX decoder.
const AudioDecoder LA0_BGM_DECODER
LA0 BGM decoder.
uint16_t la0_get_bgm_total_samples(void)
MSX Return the total number of BGM samples.
uint8_t la0_get_bgm_frequency(void)
MSX Return default frequency of the current background music.
uint16_t la0_get_bgm_loop_samples(void)
MSX Return the number of samples in the loop portion of BGM.
uint8_t la0_get_bgm_loop_counter(void)
MSX Return the loop counter value.
int la0_open_mem(MemFile *mf, const uint8_t *loc, size_t size)
MSX Open LA0 file stored in ROM / RAM.
int la0_open_bmem(MemFile *mf, bmemptr_t loc, uint32_t size)
MSX Open LA0 file stored in banked memory (MegaROM).
int la0_open_resource(MemFile *mf, const char *path)
MSX Open LA0 file stored as named resources in banked memory (MegaROM).
void la0_set_sfx(uint8_t idx, MemFile *mf)
MSX Set a song in the LA0 file to the LA0 audio decoder, as sound effects (SFX).
void la0_set_sfx_with_priority(uint8_t idx, MemFile *mf, uint8_t priority)
MSX Set a song in the LA0 file to the LA0 audio decoder, as sound effects (SFX).
void la0_set_bgm(uint8_t idx, MemFile *mf)
MSX Set a song in the LA0 file to the LA0 audio decoder, as background music (BGM).
Stream interface for ROM / RAM / MegaROM.
Internal structure of MemFile type.
The audio decoder interface.
Definition audio_dec.h:89