1 /*
2 ===========================================================================
3 Copyright (C) 1999-2005 Id Software, Inc.
4 
5 This file is part of Quake III Arena source code.
6 
7 Quake III Arena source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11 
12 Quake III Arena source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Quake III Arena source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20 ===========================================================================
21 */
22 
23 
24 void S_Init( void );
25 void S_Shutdown( void );
26 
27 // if origin is NULL, the sound will be dynamically sourced from the entity
28 void S_StartSound( vec3_t origin, int entnum, int entchannel, sfxHandle_t sfx );
29 void S_StartLocalSound( sfxHandle_t sfx, int channelNum );
30 
31 void S_StartBackgroundTrack( const char *intro, const char *loop );
32 void S_StopBackgroundTrack( void );
33 
34 // cinematics and voice-over-network will send raw samples
35 // 1.0 volume will be direct output of source samples
36 void S_RawSamples (int stream, int samples, int rate, int width, int channels,
37 				   const byte *data, float volume);
38 
39 // stop all sounds and the background track
40 void S_StopAllSounds( void );
41 
42 // all continuous looping sounds must be added before calling S_Update
43 void S_ClearLoopingSounds( qboolean killall );
44 void S_AddLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx );
45 void S_AddRealLoopingSound( int entityNum, const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx );
46 void S_StopLoopingSound(int entityNum );
47 
48 // recompute the reletive volumes for all running sounds
49 // reletive to the given entityNum / orientation
50 void S_Respatialize( int entityNum, const vec3_t origin, vec3_t axis[3], int inwater );
51 
52 // let the sound system know where an entity currently is
53 void S_UpdateEntityPosition( int entityNum, const vec3_t origin );
54 
55 void S_Update( void );
56 
57 void S_DisableSounds( void );
58 
59 void S_BeginRegistration( void );
60 
61 // RegisterSound will allways return a valid sample, even if it
62 // has to create a placeholder.  This prevents continuous filesystem
63 // checks for missing files
64 sfxHandle_t	S_RegisterSound( const char *sample, qboolean compressed );
65 
66 void S_DisplayFreeMemory(void);
67 
68 void S_ClearSoundBuffer( void );
69 
70 void SNDDMA_Activate( void );
71 
72 void S_UpdateBackgroundTrack( void );
73 
74 
75 #if USE_VOIP
76 void S_StartCapture( void );
77 int S_AvailableCaptureSamples( void );
78 void S_Capture( int samples, byte *data );
79 void S_StopCapture( void );
80 void S_MasterGain( float gain );
81 #endif
82 
83