diff options
Diffstat (limited to 'lib/rbcodec/codecs/libayumi/ayumi_render.h')
-rw-r--r-- | lib/rbcodec/codecs/libayumi/ayumi_render.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libayumi/ayumi_render.h b/lib/rbcodec/codecs/libayumi/ayumi_render.h new file mode 100644 index 0000000000..b09ea9fb3d --- /dev/null +++ b/lib/rbcodec/codecs/libayumi/ayumi_render.h | |||
@@ -0,0 +1,84 @@ | |||
1 | #ifndef AYUMI_RENDER_H | ||
2 | #define AYUMI_RENDER_H | ||
3 | |||
4 | #include "ayumi.h" | ||
5 | |||
6 | typedef unsigned char uchar; | ||
7 | typedef unsigned short ushort; | ||
8 | typedef unsigned int uint; | ||
9 | typedef unsigned long ulong; | ||
10 | |||
11 | typedef enum { | ||
12 | VTX_CHIP_AY = 0, /* emulate AY */ | ||
13 | VTX_CHIP_YM /* emulate YM */ | ||
14 | } vtx_chiptype_t; | ||
15 | |||
16 | typedef enum { | ||
17 | VTX_LAYOUT_MONO = 0, | ||
18 | VTX_LAYOUT_ABC, | ||
19 | VTX_LAYOUT_ACB, | ||
20 | VTX_LAYOUT_BAC, | ||
21 | VTX_LAYOUT_BCA, | ||
22 | VTX_LAYOUT_CAB, | ||
23 | VTX_LAYOUT_CBA, | ||
24 | VTX_LAYOUT_CUSTOM | ||
25 | } vtx_layout_t; | ||
26 | |||
27 | typedef struct { | ||
28 | vtx_chiptype_t chiptype; /* Type of sound chip */ | ||
29 | vtx_layout_t layout; /* stereo layout */ | ||
30 | uint loop; /* song loop */ | ||
31 | uint chipfreq; /* AY chip freq (1773400 for ZX) */ | ||
32 | uint playerfreq; /* 50 Hz for ZX, 60 Hz for yamaha */ | ||
33 | uint year; /* year song composed */ | ||
34 | char *title; /* song title */ | ||
35 | char *author; /* song author */ | ||
36 | char *from; /* song from */ | ||
37 | char *tracker; /* tracker */ | ||
38 | char *comment; /* comment */ | ||
39 | uint frames; /* number of AY data frames */ | ||
40 | } vtx_info_t; | ||
41 | |||
42 | typedef struct { | ||
43 | uchar *lzhdata; /* packed song data */ | ||
44 | uint lzhdata_size; /* size of packed data */ | ||
45 | uchar *regdata; /* unpacked song data */ | ||
46 | uint regdata_size; /* size of unpacked data */ | ||
47 | } vtx_data_t; | ||
48 | |||
49 | typedef struct { | ||
50 | uint frame; /* current frame position */ | ||
51 | double isr_step; | ||
52 | double isr_counter; | ||
53 | |||
54 | int dc_filter_on; | ||
55 | |||
56 | int is_ym; | ||
57 | double clock_rate; | ||
58 | int sr; | ||
59 | |||
60 | double pan[3]; | ||
61 | int is_eqp; | ||
62 | |||
63 | struct ayumi ay; /* ayumi structure */ | ||
64 | vtx_data_t data; /* packed & unpacked vtx data */ | ||
65 | vtx_info_t info; /* vtx info */ | ||
66 | } ayumi_render_t; | ||
67 | |||
68 | int AyumiRender_LoadFile(void *pBlock, uint size); | ||
69 | |||
70 | const char *AyumiRender_GetChipTypeName(vtx_chiptype_t chiptype); | ||
71 | const char *AyumiRender_GetLayoutName(vtx_layout_t layout); | ||
72 | |||
73 | uint AyumiRender_GetPos(void); | ||
74 | uint AyumiRender_GetMaxPos(void); | ||
75 | |||
76 | int AyumiRender_AyInit(vtx_chiptype_t chiptype, uint samplerate, uint chipfreq, | ||
77 | double playerfreq, uint dcfilter); | ||
78 | int AyumiRender_SetLayout(vtx_layout_t layout, uint eqpower); | ||
79 | |||
80 | int AyumiRender_Seek(ulong nSample); | ||
81 | |||
82 | ulong AyumiRender_AySynth(void *pBuffer, ulong nSamples); | ||
83 | |||
84 | #endif /* ifndef AYUMI_RENDER_H */ | ||