blob: 56142c1262c18de581acea08c719ebe692133613 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#ifndef UBOX_SOUND_DIVIDER
/* ubox_sound_update will be called from the timer int, so we update every
* 1080ms approx by using a counter and updating 1 in 20 interrupts */
#define UBOX_SOUND_DIVIDER 20
#endif
typedef struct
{
const char *data;
size_t len;
} ubox_sound_data;
/* mus is expected to be a IT module, efx are samples */
uint8_t ubox_sound_init(const ubox_sound_data *mus, const ubox_sound_data *efx, uint8_t efx_cnt);
void ubox_sound_free();
void ubox_sound_update();
void ubox_sound_music_pattern(uint16_t pat);
/* priority based efx player using order:
* The effects plays if nothing is playing or if the effect playing has equal
* or less priority.
*/
void ubox_sound_play_efx(uint8_t efxno);
void ubox_sound_mute();
void ubox_sound_unmute();
|