Quake-2

Quake 2 GPL Source Release
Log | Files | Refs

sound.h (1606B)


      1 /*
      2 Copyright (C) 1997-2001 Id Software, Inc.
      3 
      4 This program is free software; you can redistribute it and/or
      5 modify it under the terms of the GNU General Public License
      6 as published by the Free Software Foundation; either version 2
      7 of the License, or (at your option) any later version.
      8 
      9 This program is distributed in the hope that it will be useful,
     10 but WITHOUT ANY WARRANTY; without even the implied warranty of
     11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     12 
     13 See the GNU General Public License for more details.
     14 
     15 You should have received a copy of the GNU General Public License
     16 along with this program; if not, write to the Free Software
     17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
     18 
     19 */
     20 
     21 struct sfx_s;
     22 
     23 void S_Init (void);
     24 void S_Shutdown (void);
     25 
     26 // if origin is NULL, the sound will be dynamically sourced from the entity
     27 void S_StartSound (vec3_t origin, int entnum, int entchannel, struct sfx_s *sfx, float fvol,  float attenuation, float timeofs);
     28 void S_StartLocalSound (char *s);
     29 
     30 void S_RawSamples (int samples, int rate, int width, int channels, byte *data);
     31 
     32 void S_StopAllSounds(void);
     33 void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up);
     34 
     35 void S_Activate (qboolean active);
     36 
     37 void S_BeginRegistration (void);
     38 struct sfx_s *S_RegisterSound (char *sample);
     39 void S_EndRegistration (void);
     40 
     41 struct sfx_s *S_FindName (char *name, qboolean create);
     42 
     43 // the sound code makes callbacks to the client for entitiy position
     44 // information, so entities can be dynamically re-spatialized
     45 void CL_GetEntitySoundOrigin (int ent, vec3_t org);