XenevaOS
Loading...
Searching...
No Matches
s_sound.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// The not so system specific sound interface.
17//
18
19
20#ifndef __S_SOUND__
21#define __S_SOUND__
22
23#include "p_mobj.h"
24#include "sounds.h"
25
26//
27// Initializes sound stuff, including volume
28// Sets channels, SFX and music volume,
29// allocates channel buffer, sets S_sfx lookup.
30//
31
32void S_Init(int sfxVolume, int musicVolume);
33
34
35// Shut down sound
36
37void S_Shutdown(void);
38
39
40
41//
42// Per level startup code.
43// Kills playing sounds at start of level,
44// determines music if any, changes music.
45//
46
47void S_Start(void);
48
49//
50// Start sound for thing at <origin>
51// using <sound_id> from sounds.h
52//
53
54void S_StartSound(void *origin, int sound_id);
55
56// Stop sound for thing at <origin>
57void S_StopSound(mobj_t *origin);
58
59
60// Start music using <music_id> from sounds.h
61void S_StartMusic(int music_id);
62
63// Start music using <music_id> from sounds.h,
64// and set whether looping
65void S_ChangeMusic(int music_id, int looping);
66
67// query if music is playing
68boolean S_MusicPlaying(void);
69
70// Stops the music fer sure.
71void S_StopMusic(void);
72
73// Stop and resume music, during game PAUSE.
74void S_PauseSound(void);
75void S_ResumeSound(void);
76
77
78//
79// Updates music & sounds
80//
81void S_UpdateSounds(mobj_t *listener);
82
83void S_SetMusicVolume(int volume);
84void S_SetSfxVolume(int volume);
85
86extern int snd_channels;
87
88#endif
89
int sfxVolume
Definition s_sound.c:86
int musicVolume
Definition s_sound.c:90
void S_Init(int sfxVolume, int musicVolume)
Definition s_sound.c:114
void S_StartMusic(int music_id)
Definition s_sound.c:596
void S_StopSound(mobj_t *origin)
Definition s_sound.c:243
void S_Start(void)
Definition s_sound.c:191
void S_PauseSound(void)
Definition s_sound.c:482
void S_SetMusicVolume(int volume)
Definition s_sound.c:571
void S_StartSound(void *origin, int sound_id)
Definition s_sound.c:391
void S_Shutdown(void)
Definition s_sound.c:146
void S_ResumeSound(void)
Definition s_sound.c:491
void S_ChangeMusic(int music_id, int looping)
Definition s_sound.c:601
void S_SetSfxVolume(int volume)
Definition s_sound.c:582
void S_UpdateSounds(mobj_t *listener)
Definition s_sound.c:504
int snd_channels
Definition s_sound.c:106
void S_StopMusic(void)
Definition s_sound.c:654
boolean S_MusicPlaying(void)
Definition s_sound.c:649
Definition p_mobj.h:202