1 #ifndef LIBXMP_PAULA_H
2 #define LIBXMP_PAULA_H
3 
4 /* 131072 to 0, 2048 entries */
5 #define PAULA_HZ 3546895
6 #define MINIMUM_INTERVAL 16
7 #define BLEP_SCALE 17
8 #define BLEP_SIZE 2048
9 #define MAX_BLEPS (BLEP_SIZE / MINIMUM_INTERVAL)
10 
11 /* the structure that holds data of bleps */
12 struct blep_state {
13 	int16 level;
14 	int16 age;
15 };
16 
17 struct paula_state {
18 	/* the instantenous value of Paula output */
19 	int16 global_output_level;
20 
21 	/* count of simultaneous bleps to keep track of */
22 	unsigned int active_bleps;
23 
24 	/* place to keep our bleps in. MAX_BLEPS should be
25 	 * defined as a BLEP_SIZE / MINIMUM_EVENT_INTERVAL.
26 	 * For Paula, minimum event interval could be even 1, but it makes
27 	 * sense to limit it to some higher value such as 16. */
28 	struct blep_state blepstate[MAX_BLEPS];
29 
30 	double remainder;
31 	double fdiv;
32 };
33 
34 
35 void	libxmp_paula_init	(struct context_data *, struct paula_state *);
36 
37 #endif /* !LIBXMP_PAULA_H */
38