Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Examples / Low-level / PT-AHIPlay / PT-AHIPlay.h
blobb1e36f7ddf626241cfe49058a2908d44aa43dccb
2 #include <devices/ahi.h>
4 extern __asm BOOL mt_init( register __a2 struct PTData * );
5 extern __asm BOOL mt_start( register __a2 struct PTData * );
6 extern __asm void mt_stop( register __a2 struct PTData * );
7 extern __asm void mt_end( register __a2 struct PTData * );
8 extern __asm void mt_music( register __a2 struct PTData * );
10 #define n_note 0
11 #define n_cmd 2
12 #define n_cmdlo 3
13 #define n_start 4
14 #define n_length 8
15 #define n_loopstart 10
16 #define n_replen 14
17 #define n_period 16
18 #define n_finetune 18
19 #define n_volume 19
20 #define n_dmabit 20
21 #define n_toneportdirec 22
22 #define n_toneportspeed 23
23 #define n_wantedperiod 24
24 #define n_vibratocmd 26
25 #define n_vibratopos 27
26 #define n_tremolocmd 28
27 #define n_tremolopos 29
28 #define n_wavecontrol 30
29 #define n_glissfunk 31
30 #define n_sampleoffset 32
31 #define n_pattpos 33
32 #define n_loopcount 34
33 #define n_funkoffset 35
34 #define n_wavestart 36
35 #define n_reallength 40
36 #define n_SIZEOF 42
38 struct PaulaEmul
40 BOOL pe_NewSample; /* Flag */
41 ULONG pe_Offset; /* Offset from sample start */
42 UWORD pe_Length; /* Length in *WORDS* (like Paula)*/
43 BOOL pe_NewLoopSample; /* Flag */
44 ULONG pe_LoopOffset; /* Offset from sample start */
45 UWORD pe_LoopLength; /* Length in *WORDS* (like Paula)*/
46 BOOL pe_NewPeriod; /* Flag */
47 UWORD pe_Period; /* Paula period */
48 BOOL pe_NewVolume; /* Flag */
49 UWORD pe_Volume; /* Paula volume, 0-64 */
52 struct PTData
54 struct AHIBase *ptd_AHIBase; /* Must be initialized! */
55 struct AHIAudioCtrl *ptd_AudioCtrl; /* Must be initialized! */
56 APTR ptd_ModuleAddress; /* Must be initialized! */
58 struct PaulaEmul ptd_Ch2; /* Ch2 (left) */
59 struct PaulaEmul ptd_Ch1; /* Ch1 (right) */
60 struct PaulaEmul ptd_Ch3; /* Ch3 (left) */
61 struct PaulaEmul ptd_Ch4; /* Ch4 (right) */
63 ULONG ptd_SampleStarts[31];
64 UBYTE ptd_chan1temp[n_SIZEOF];
65 UBYTE ptd_chan2temp[n_SIZEOF];
66 UBYTE ptd_chan3temp[n_SIZEOF];
67 UBYTE ptd_chan4temp[n_SIZEOF];
69 UWORD ptd_NewTempo;
70 UWORD ptd_Tempo;
72 UBYTE ptd_speed;
73 UBYTE ptd_counter;
74 UBYTE ptd_SongPos;
75 UBYTE ptd_PBreakPos;
76 UBYTE ptd_PosJumpFlag;
77 UBYTE ptd_PBreakFlag;
78 UBYTE ptd_LowMask;
79 UBYTE ptd_PattDelTime;
80 UBYTE ptd_PattDelTime2;
81 UBYTE ptd_Enable;
82 UWORD ptd_PatternPos;
83 UWORD ptd_DMACONtemp;