llvm-mos-sdk
famitone2.h
Go to the documentation of this file.
1 #ifndef _FAMITONE2_H_
2 #define _FAMITONE2_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 // Set up music data in bank always accessible to Famitone2 code.
9 __attribute__((leaf)) void music_init(const void *music_data);
10 
11 // Set up music data in bank that must be switched to.
12 __attribute__((leaf)) void banked_music_init(char bank, const void *music_data);
13 
14 // play a music in FamiTone format
15 __attribute__((leaf)) void music_play(char song);
16 
17 // stop music
18 __attribute__((leaf)) void music_stop(void);
19 
20 // pause and unpause music
21 __attribute__((leaf)) void music_pause(char pause);
22 
23 // Set up sounds data in bank always accessible to Famitone2 code.
24 __attribute__((leaf)) void sounds_init(const void *sounds_data);
25 
26 // Set up sounds data in bank that must be switched to.
27 __attribute__((leaf)) void banked_sounds_init(char bank,
28  const void *sounds_data);
29 
30 // play FamiTone sound effect on channel 0..3
31 __attribute__((leaf)) void sfx_play(char sound, char channel);
32 
33 // play a DPCM sample, 1..63
34 __attribute__((leaf)) void sample_play(char sample);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif // _FAMITONE2_H_
channel
char channel
Definition: famitone2.h:31
music_data
const void * music_data
Definition: famitone2.h:12
sounds_data
const void * sounds_data
Definition: famitone2.h:28