1 /* libamp header */
2 
3 #ifdef ALLEGRO_H
4 
5 /* test for Allegro version */
6 #if ALLEGRO_VERSION<3
7 /* we need at least 3.0 to support audio streams */
8 #error LibAmp requires Allegro 3.0
9 #endif
10 /* we have Allegro 3.x */
11 /* but pure 3.0 supports only mono streams, so we have to use
12    two streams, panned hard left and hard right respectively */
13 #define AMP_ALLEGRO30
14 #ifdef ALLEGRO_DATE
15 /* ALLEGRO_DATE is defined, so we have 3.0+WIP */
16 /* the WIP changed the API slightly, so we need to undefine
17    AMP_ALLEGRO30 to use the new API */
18 #undef AMP_ALLEGRO30
19 /* the new API also enables the use of AMP_MIXSTEREO */
20 /* only define if your programs can use it (programs that use
21    amp_play_left and amp_play_right to show scopes will need
22    to be modified for the new stereo mode) */
23 #define AMP_MIXSTEREO
24 #endif
25 
26 #endif
27 
28 extern int amp_bitrate,amp_samprat;
29 extern int amp_mpg_ver,amp_layer,amp_stereo,amp_pollsize;
30 extern int amp_playing,amp_loaded,amp_reverse_phase;
31 extern int amp_dec_frame,amp_dec_time;
32 extern int amp_frame,amp_time;
33 
34 extern unsigned short*amp_buf_left,*amp_buf_right;
35 extern int amp_buf_len;
36 
37 extern unsigned short*amp_play_left,*amp_play_right;
38 extern int amp_play_len;
39 
40 int install_amp(void);
41 int load_amp(char*filename,int loop);
42 int poll_amp(void);
43 int run_amp(void);
44 int replay_amp(void);
45 int seek_amp_abs(int frame);
46 int seek_amp_rel(int framecnt);
47 int unload_amp(void);
48 
49