source: abuse/tags/pd/macabuse/imlib/include/sound.hpp

Last change on this file was 49, checked in by Sam Hocevar, 12 years ago
  • Imported original public domain release, for future reference.
File size: 823 bytes
Line 
1#ifndef __SOUND_HPP_
2#define __SOUND_HPP_
3
4/* options are passed via command line */
5     
6#define SFX_INITIALIZED    1
7#define MUSIC_INITIALIZED  2
8
9int sound_init(int argc, char **argv);
10void sound_uninit();
11void print_sound_options();                         // print the options avaible for sound
12
13class sound_effect
14{
15  long size;
16  void *data;
17public :
18  sound_effect(char *filename);
19  void play(int volume=127, int pitch=128, int panpot=128);
20  ~sound_effect();
21} ;
22
23
24class song
25{
26  char *Name;
27  unsigned char *data;
28  unsigned long song_id;
29public :
30  char *name() { return Name; }
31  song(char *filename);
32  void play(unsigned char volume=127);
33  void stop(long fadeout_time=0);                                        // time in ms
34  int playing();
35  void set_volume(int volume);
36  ~song();
37} ;
38#endif
39
40
41
42
43
44
45
46
47
48
49
Note: See TracBrowser for help on using the repository browser.