aboutsummaryrefslogtreecommitdiff
path: root/src/i_sound.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/i_sound.h')
-rw-r--r--src/i_sound.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/src/i_sound.h b/src/i_sound.h
new file mode 100644
index 0000000..e03ccbf
--- /dev/null
+++ b/src/i_sound.h
@@ -0,0 +1,120 @@
1/* Emacs style mode select -*- C++ -*-
2 *-----------------------------------------------------------------------------
3 *
4 *
5 * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 * based on BOOM, a modified and improved DOOM engine
7 * Copyright (C) 1999 by
8 * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 * Copyright (C) 1999-2000 by
10 * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 * Copyright 2005, 2006 by
12 * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 * 02111-1307, USA.
28 *
29 * DESCRIPTION:
30 * System interface, sound.
31 *
32 *-----------------------------------------------------------------------------*/
33
34#ifndef __I_SOUND__
35#define __I_SOUND__
36
37#include "sounds.h"
38#include "doomtype.h"
39
40#define SNDSERV
41#undef SNDINTR
42
43#ifndef SNDSERV
44#include "l_soundgen.h"
45#endif
46
47// Init at program start...
48void I_InitSound(void);
49
50// ... shut down and relase at program termination.
51void I_ShutdownSound(void);
52
53//
54// SFX I/O
55//
56
57// Initialize channels?
58void I_SetChannels(void);
59
60// Get raw data lump index for sound descriptor.
61int I_GetSfxLumpNum (sfxinfo_t *sfxinfo);
62
63// Starts a sound in a particular sound channel.
64int I_StartSound(int id, int channel, int vol, int sep, int pitch, int priority);
65
66// Stops a sound channel.
67void I_StopSound(int handle);
68
69// Called by S_*() functions
70// to see if a channel is still playing.
71// Returns 0 if no longer playing, 1 if playing.
72boolean I_SoundIsPlaying(int handle);
73
74// Called by m_menu.c to let the quit sound play and quit right after it stops
75boolean I_AnySoundStillPlaying(void);
76
77// Updates the volume, separation,
78// and pitch of a sound channel.
79void I_UpdateSoundParams(int handle, int vol, int sep, int pitch);
80
81//
82// MUSIC I/O
83//
84void I_InitMusic(void);
85void I_ShutdownMusic(void);
86
87void I_UpdateMusic(void);
88
89// Volume.
90void I_SetMusicVolume(int volume);
91
92// PAUSE game handling.
93void I_PauseSong(int handle);
94void I_ResumeSong(int handle);
95
96// Registers a song handle to song data.
97int I_RegisterSong(const void *data, size_t len);
98
99// cournia - tries to load a music file
100int I_RegisterMusic( const char* filename, musicinfo_t *music );
101
102// Called by anything that wishes to start music.
103// plays a song, and when the song is done,
104// starts playing it again in an endless loop.
105// Horrible thing to do, considering.
106void I_PlaySong(int handle, int looping);
107
108// Stops a song over 3 seconds.
109void I_StopSong(int handle);
110
111// See above (register), then think backwards
112void I_UnRegisterSong(int handle);
113
114// Allegro card support jff 1/18/98
115extern int snd_card;
116extern int mus_card;
117// CPhipps - put these in config file
118extern int snd_samplerate;
119
120#endif