File: sound.h

package info (click to toggle)
bomberclone 0.11.9-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,224 kB
  • sloc: ansic: 14,256; sh: 3,800; makefile: 332
file content (49 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* $Id: sound.h,v 1.4 2003-12-24 02:38:15 stpohle Exp $ */
/* include file for the sound */

#ifndef _SOUND_H_
#define _SOUND_H_

#include "bomberclone.h"

#if HAVE_SDL_MIXER
#include <SDL_mixer.h>
#else
#define Mix_Chunk void
#define Mix_Music void
#endif

enum _soundsample {
	SND_dead = 0,
	SND_explode,
	SND_bombdrop,
	
	SND_max
};

struct __snd {
	unsigned char inited;

	Mix_Chunk *sample[SND_max]; // henqvist
	Mix_Music *music; // henqvist

    int audio_rate;
    Uint16 audio_format;
    int audio_channels;
	int playmusic;
	int playsound;
	
} typedef _snd;

extern _snd snd;

void snd_play(int samplenr);
void snd_music_start();
void snd_music_stop();
void snd_init();
void snd_load(char *tilesetname);
void snd_free ();
void snd_options ();
void snd_shutdown ();

#endif