Mercurial > repos > blastem
comparison mediaplayer.h @ 2289:92449b47cce8
Integrate VGM player into main blastem binary
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 04 Feb 2023 22:44:44 -0800 |
parents | |
children | c4980d89614b |
comparison
equal
deleted
inserted
replaced
2288:efc75ea79164 | 2289:92449b47cce8 |
---|---|
1 #ifndef MEDIAPLAYER_H_ | |
2 #define MEDIAPLAYER_H_ | |
3 | |
4 #include <stdint.h> | |
5 #include "system.h" | |
6 #include "vgm.h" | |
7 | |
8 typedef struct chip_info chip_info; | |
9 typedef void (*chip_run_fun)(void *context, uint32_t cycle); | |
10 typedef void (*chip_adjust_fun)(chip_info *chip); | |
11 struct chip_info { | |
12 void *context; | |
13 chip_run_fun run; | |
14 chip_adjust_fun adjust; | |
15 data_block *blocks; | |
16 uint32_t clock; | |
17 uint32_t samples; | |
18 uint8_t cmd; | |
19 uint8_t data_type; | |
20 }; | |
21 | |
22 typedef struct { | |
23 system_header header; | |
24 system_media *media; | |
25 vgm_header *vgm; | |
26 vgm_extended_header *vgm_ext; | |
27 data_block *ym_seek_block; | |
28 chip_info *chips; | |
29 uint32_t num_chips; | |
30 uint32_t current_offset; | |
31 uint32_t playback_time; | |
32 uint32_t wait_samples; | |
33 uint32_t ym_seek_offset; | |
34 uint32_t ym_block_offset; | |
35 uint8_t state; | |
36 uint8_t media_type; | |
37 uint8_t should_return; | |
38 } media_player; | |
39 | |
40 media_player *alloc_media_player(system_media *media, uint32_t opts); | |
41 | |
42 | |
43 #endif //MEDIAPLAYER_H_ |