|
1 /** |
|
2 * $Id: audioplayer.h 48 2008-01-09 23:59:19Z mbroeker $ |
|
3 * $URL: http://localhost/svn/c/VirtualReader/trunk/include/audioplayer.h $ |
|
4 */ |
|
5 |
|
6 #ifndef __AUDIOPLAYER_H__ |
|
7 #define __AUDIOPLAYER_H__ |
|
8 |
|
9 #include <stdio.h> |
|
10 #include <stdlib.h> |
|
11 #include <unistd.h> |
|
12 #include <sys/types.h> |
|
13 #include <sys/stat.h> |
|
14 #include <time.h> |
|
15 |
|
16 #include <SDL/SDL.h> |
|
17 |
|
18 /* audioplayer(filename, milliseconds, position) */ |
|
19 int audioplayer (char *, Uint32); |
|
20 |
|
21 /* initializes the sdl-soundsystem and prepares local structures */ |
|
22 int audio_init (); |
|
23 |
|
24 /* closes the sdl-soundsystem and frees local structures */ |
|
25 void audio_shutdown (); |
|
26 |
|
27 /* audioplayer_getwavelength(filename) */ |
|
28 Uint32 audioplayer_getwavelength (char *); |
|
29 |
|
30 /* returns the bitrate of the wave-file */ |
|
31 int audioplayer_getbitrate (); |
|
32 |
|
33 /* stopps playback immediately */ |
|
34 void audioplayer_stop (); |
|
35 |
|
36 /* returns the current time in ms */ |
|
37 Uint32 audioplayer_gettime (); |
|
38 |
|
39 /* sets the current position in ms */ |
|
40 void audioplayer_settime (long); |
|
41 |
|
42 /* returns the length of the RIFF in ms */ |
|
43 Uint32 audioplayer_getsoundlen (); |
|
44 |
|
45 /* returns the current position */ |
|
46 Uint32 audioplayer_getposition (); |
|
47 |
|
48 /* wait replaces sdl_delay */ |
|
49 void audioplayer_delay (Uint32); |
|
50 |
|
51 /* switches verbosity on/off */ |
|
52 void audioplayer_setverbose (int); |
|
53 |
|
54 #endif |