source: abuse/trunk/src/sdlport/sound.hpp @ 124

Last change on this file since 124 was 124, checked in by Sam Hocevar, 13 years ago
  • Get rid of ugly tabs and trailing spaces everywhere.
File size: 1.1 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#ifndef __SOUND_HPP_
11#define __SOUND_HPP_
12
13/* options are passed via command line */
14
15#define SFX_INITIALIZED    1
16#define MUSIC_INITIALIZED  2
17
18int sound_init(int argc, char **argv);
19void sound_uninit();
20void print_sound_options();                         // print the options avaible for sound
21
22class sound_effect
23{
24  long size;
25  void *data;
26public :
27  sound_effect(char *filename);
28  void play(int volume=127, int pitch=128, int panpot=128);
29  ~sound_effect();
30} ;
31
32
33class song
34{
35  char *Name;
36  unsigned char *data;
37  unsigned long song_id;
38public :
39  char const *name() { return Name; }
40  song(char const *filename);
41  void play(unsigned char volume=127);
42  void stop(long fadeout_time=0);                                        // time in ms
43  int playing();
44  void set_volume(int volume);
45  ~song();
46} ;
47#endif
48
49
50
51
52
53
54
55
56
57
58
Note: See TracBrowser for help on using the repository browser.